In ASP.NET,when we click a button Web page post the page to itself.
But cross page posting is to post one page to another page.
This is used generally in a multi page forms where we put previous next
button and these buttons are used to post one form data to another form
so that last form can have the full data.
Cross page posting can be done in the following ways:
A.Using Button and Postback url
<asp:Button ID="Button1" runat="server" Text="" PostBackUrl="~/DestinationPage.aspx" />
server.Transfer has following three overload.
1. Server.Transfer("site url");
2. Server.Transfer("site url",true);
To Check for CrossPagePostback check the following in the destination page
1.Page.PreviousPage is NOT NULL,
2.PreviousPage.IsCrossPagePostback is true
TextBox txtName = (TextBox)previousPage.FindControl("txtName");