Posts

Showing posts from April, 2016

Cross Page Post Back

What is Cross Page Post Back ? Asp.Net 2.0 fixed this with built-in features that allowed us to easily send information from one page to another. Button control has property  PostBackUrl  that can be set to URL of any page in our ASP.Net WebSite where we want to transfer all form values to. Along with that Asp.Net 2.0  Page  class has a property  PreviousPage  that allows us to get reference to the Page object that initiated the postback (in other words to get the actual reference to the Page object of the aspx page on which user clicked the Submit button on a HTML form). So for example lets create two sample pages in our Web Application:   SourcePage.aspx DestinationPage.aspx In SoucePage in Html form we will put two TextBox controls (one for First Name and one for Last Name) and one Button component  and set its PostBackUrl property to "~/DestinationPage.aspx". SourcePage.aspx:     < form   id = " form1 "   runat = " server " >