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
What is a parameter? Explain the new types of parameters introduced in C# 4.0. A parameter is a special type of variable, which is used in a function to give a piece of informa

As its name suggests, the website builder must be a desktop application that will allow users to simply create websites. Essentially, the program will have to give the users with a

What are the difference b/w System.String and System.StringBuilder classes? The System.StringBuilder can have mutable string where a variety of operations can be performed whil

What is "Common Language Runtime" (CLR)?  CLR is .NET equivalent of Java Virtual Machine (JVM). It is the runtime that changes a MSIL code into the host machine language code,

ASP.NET/MSSQL/ MVC completing backend solution + integrating with frontend. - repost Project Description: System is used for tracking company's activities through several pro

Passport authentication A centralized service given by Microsoft, offers a single logon point for clients. Unauthenticated users are redirected to the Passport site

show the dot net topic

Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Textilepro.frmLogin.resources" was correctly embedded or linked into assembly

Project Description: I am seeking a serious and motivated software developer that can create for me software like scanspeeder with all the functions as it has. Only thing that I

What does Address Of operator do? The Address Of operator generates a delegate object for the BackgroundProcess method. A delegate within VB.NET is a object-oriented, type-safe