|
zhouji700I will write it out and see if something is wrong
test.ascx
1.Textbox1
2.Botton
s
public string keyword
{
get {return TextBox1.Text;}
}
protected void Button1_Click (object sender, EventArgs e)
{
Server.Transfer ("main.aspx");
}
==================================
test.ascx into index.aspx page
<% @ Register Src = "test.ascx" TagName = "test" TagPrefix = "uc1"%>
And in index.aspx.cs
protected test myascx;
==============================
main.aspx.cs
protected void Page_Load (object sender, EventArgs e)
{
Response.Write (myascx.keyword);
}
Compiler Error Message: CS0103: The name "myascx" does not exist in the current context |
|