Cross Postback
02/06/2009 16:19Note: Use Linkbutton or Hyperlink for postback dont use Response.Redirect()
In Default4:
<%@ PreviousPageType VirtualPath="~/Default3.aspx" %>
In Default3.cs
private string getstr;
public string Getstr
{
get { return getstr; }
set { getstr = value; }
}
protected void Page_Load(object sender, EventArgs e)
{
Getstr = "Jeyachandran";
}
In Default4.cs
Response.Write(((TextBox)Page.PreviousPage.FindControl("TextBox1")).Text);
Response.Write(PreviousPage.Getstr);
———
Back