[ZT] Submitting Web Form Data from One ASP.NET Page To Another

xiaoxiao2021-03-06  42

Submitting Web Form Data from One ASP.NET Page to Anotherby SENTHIL RAMASAMY.

This article discusses different options you as a developer have in ASP.NET to send data from one ASP.NET page to another. Since you can not use ASP.NET Web Controls (System.Web.UI.WebControls) in such a scenario (which Only Allow Posting Back of Data To The Same Page, this article discusses Other Ways Like Using httpcontext object.

This article is about submitting data from Web Forms (forms with runat = "server" attribute). You easily submit your form data to another page by removing the runat = "server" attribute, then you can not use more advanced ASP.NET Server controls .

Note: Here The Term 'Web Forms' refers to form tag with runat = "server" attribute.

In ASP.NET Web Forms you can not submit your form data from one page to another using ASP.NET Web Controls (System.Web.UI.WebControls), it is always posted back to the same page. Of course ASP.NET Web Forms STYLL SUPPORT The Classic ASP Style of Submitting The Form Data To Another Page. You Can MiMic The Wizard Style Approach Common In Classic ASP BY Using Any ONE FOLLOWING METHODS:

Method 1using Property Procedure and Context to Transfer Web Form Data To Another Page Read The Program Given Below:

<% @ Page language = "vb" classname = "senderclass"%>