Articles → .NET → Cross Page Post back

Cross Page Post back






Implementation






<asp:TextBox ID="txtName" runat="server"></asp:TextBox>
<asp:Button runat="server" Text="Navigate to other page" PostBackUrl="~/cross_page_post_back_destination.aspx" />





Click to Enlarge



protected void Page_Load(object sender, EventArgs e) {
  TextBox txtName = (TextBox) PreviousPage.FindControl("txtName");
  Response.Write(txtName.Text);
}



Output



Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, April 21, 2010
 
Updated On  -  Saturday, May 16, 2015

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250