第一个页面代码:要设置它的回传页PostBackUrl
第二个页面的load事件中判断是不是跨页回传页,如果是就可以使用form属性获取表单中的值
protected void Page_Load(object sender, EventArgs e)
{
if(PreviousPage!=null){//来源也是否为空
if(PreviousPage.IsCrossPagePostBack){
string name = Request.Form["TextBox1"].ToString();
Response.Write(name);//我是直接输出textbox1中的值
}
}
}