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
This assignment document will be distributed from Blackboard assignment folder. Some parts of the assignments will require you to research answers from your text book (you must rea

I need C# API for bitfinex Project Description: Hi, I need a developer to build a library in C# that connects to the bitfinex API. The library must implement all the authenti

What precautions we need to take while deploying satellite assemblies? When we distribute the assembly, the folder structure has to be very organized. The table below shows how

Project Description: I am having a table available in excel format and features the subsequent: - It has about 170000 rows - Some text is longer than 255 in length. - S

how socket workes in .net

What is a project baselines? The Project base line defines a logical closure of any deliverable or cycle. For example you have done the requirement phase with sign off from the

1  Assignment Description   This is an individual assignment. Students are referred to the Faculty's policy on plagiarism.  In this assignment you will build a prototype of a si

Experienced Outlook addin (Microsoft Office) developer Project Description: About us in a nutshell: We are a young start-up that buys a refreshing product in the field of ent

The problem statement is pretty simple. We need a software implementation of a Point of Sale terminal at a typical store. The users of the system are the cashiers sitting at the sa

The Cache object is always defined in the System.Web.Caching namespace. You can get the reference to the Cache object by either using the Cache property of the HttpContext class in