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
Give a brief introduction to Binders. Binders are used by DLR to communicate with not the .NET Framework but also with a variety of other services, like Silverlight and COM. Th

How can we implement singleton pattern in .NET ? The Singleton pattern basically focuses on having one and only one instance of the object running. Lets take an e.g. a windows

Project Description: Looking for a JQuery expert that will develop a customizable product selection page to work with our asp.net website. Product selection, size, quantity, pri

NameSpace Namespace consists of 2  main basic functionality :- NameSpace Logically types group , ex. System.Web.UI logically groups our UI related features. In Object O

What is DISCO? DISCO is a method developed by Microsoft to publish and discover Web services. It discovers URLs of all XML Web services located on a Web server and develops a

Name the classes that are introduced in the System.Numerics namespace. The following two new classes are introduced in the System.Numerics namespace:  BigInteger - Refers

I need Online Slot Video Game For A Facebook Project Description: Prepare an online slot video game for a Face book promotion in order to attract new visits and Increase the

Perform Arithmetic operations on Floating Values - C# Program Hello, I've been trying so many codes for this but those codes didn't work well. Please write the code for Perfor

Explain the difference between XML and HTML. XML explains data while HTML describes how the data should be displayed. Thus, HTML is about displaying information while XML is ab

Explain the fundamental of connection pooling. Whenever a connection is opened first time a connection pool is created and is based on the exact match of the connection string