a.aspx頁面代碼:
protected void Button5_Click(object sender, EventArgs e){Server.Transfer("b.aspx");}public string name{get{return this.TextBox1.Text;}}
b.aspx頁面代碼:
private void TheFour(){a newWeb=Context.Handler as a;//創建頁面a的實例this.TextBox1.Text = newWeb.name;}
b頁面必須在前臺加入以下一句:
<%@ PreviousPageType VirtualPath="~/a.aspx" %>