从页面test1.aspx传值到 test3.aspx
test1.aspx页面:
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Server.Transfer("test3.aspx");
}
public string aa
{
get { return TextBox1.Text; }
set { TextBox1.Text = value; }
}
test3.aspx页面接收:
首先加上引用页面
<%@Reference page ="test1.aspx"%>
test1 aaa = (test1)Context.Handler;
Response.Write("传过来的值:"+aaa.aa);