Cross-page posting means that you are posting form data to another page as opposed to posting form data back to the same page (as is the default in ASP.NET). This can be useful when you want to post data to another page and don't want to incur the overhead of reloading the current page simply to redirect the user to another page.
A cross-page postback is a technique that extends the postback mechanism you’ve already learned about so that one page can send the user to another page, complete with all the information for that page. This technique sounds conceptually straightforward, but it’s a potential minefield. If you’re not careful, it can lead you to create pages that are tightly coupled to others and difficult to enhance and debug. The infrastructure that supports cross-page postbacks is a property named PostBackUrl, which is defined by the IButtonControl interface and turns up in button controls such as ImageButton, LinkButton, and Button. To use cross-posting, you simply set PostBackUrl to the name of another web form. When the user clicks the button, the page will be posted to that new URL with the values from all the input controls on the current page. (This posted-back information includes the hidden view-state field. As you’ll see shortly, it allows ASP.NET to create an up-to-date instance of the source page in memory.) Here’s an example—a page named CrossPage1.aspx that defines a form with two text boxes and a button. When the button is clicked, it posts to a page named CrossPage2.aspx. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="CrossPage1.aspx.cs" Inherits="CrossPage1" %>
Ravishankar NPosted Feb 25, 2019, 7:16 AM
Puneet KankarPosted Feb 24, 2019, 10:16 AM
VanitaPosted Feb 24, 2019, 6:53 AM