How to access view state value of the page in the next page?, DOT NET Programming

How do we access view state value of the page in the next page?

The View state is page specific; it contains information about controls embedded at the particular page. ASP.NET 2.0 solves this by embedding a hidden input field name, __POSTBACK. This field is then embedded only when there is an IButtonControl on the page and its PostBackUrl property is set to a non-null value. This field contains the view of state information of the poster page. To access this view state of the poster page, you can use the new PreviousPage property of the page:

Page poster = this.PreviousPage;

Now  you can find any control from the previous page and see  its state:

Label posterLabel = poster.findControl("myLabel");

string lbl = posterLabel.Text;

This cross-page post back facility also solves the problem of posting a Form to multiple pages, as  each control, in theory, can point to different post back URL.

Posted Date: 9/22/2012 1:10:22 AM | Location : United States







Related Discussions:- How to access view state value of the page in the next page?, Assignment Help, Ask Question on How to access view state value of the page in the next page?, Get Answer, Expert's Help, How to access view state value of the page in the next page? Discussions

Write discussion on How to access view state value of the page in the next page?
Your posts are moderated
Related Questions
Explain the architecture of ADO.NET in brief. AD0.NET having of two fundamental components: The DataSet, which is disconnected from the data source and does not require to k

Shipping Emails Bulk System Project Description: We need to develop a system for sending emails to a large mass, without using third-party services, administration by us, or

Xlsx/Csv File Reader Need C# MVC coder that will do the following- Take a filepath for an online xlsx, xls or csv file (must be able to handle each of these formats) as well

What are different transaction levels in SQL SERVER? The Transaction Isolation level decides how is the one process isolated from theother process. Using the transaction levels


WDS and MDT Deployment Server Training Project Description: I'm seeking someone who can Teach/Train me with MDT and WDS server. This Can be online teaching courses. I will

It's never told  to distribute complete implementation at client, due to following shown  reasons:- 1) Anyone can use ILDASM and decrypt your logic. 2) It is a bad architectu

how can we use entity framework in ASP.Net MVC

how to replace a keyword using powershell

What is black box testing & White box testing? The Black box testing is also termed as functional testing. It ignores how the internal functionality of a system works & depends