- Default1.aspx
<
body> <form id="form1" runat="server"> <div> <asp:Button ID="Button1" runat="server" PostBackUrl="~/Default2.aspx" Text="Button" /> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox></div> </form></
body> -
Default2.aspx
protected void Page_Load(object sender, EventArgs e)
{
if (Page.PreviousPage != null)
{
TextBox search2 = (TextBox)Page.PreviousPage.FindControl("TextBox1");
Label1.Text = search2.Text;
}
}
转载于:https://www.cnblogs.com/xuxiaoguang/archive/2007/08/20/862964.html