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
If client side validation is enabled in your Web page, does that mean server side code is not run Whenever the client side validation is enabled server emit's JavaScript code f

Calculate Standard Deviation - C# Program Hello i am unable to find the code for Calculate Standard Deviation in c#. Can anybody please provide me the assignment help?

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

ASP.net developer for a mobile project I am looking for an Icenium developer using the Visual Studio extension and jquery. The application will incorporate with an already wr

CTS(Common Type System) : In order that the two language communicate smoothly CLR has CTS (Common Type System). Example in VB you have "Integer" and in C++ you have "long" these d

Give a small explanation of all Elements in the diagram. Action State: - This is a type of state that has an internal action and one outgoing event that would do the int

Looking to build FIFA coins selling and buying website Project Description: I would like a website made for FIFA 14 TEAM. What this website will do is having automatically bu

How does output caching work in ASP.NET?    Output caching is a powerful method that enhances request/response throughput by caching the content generated from dynamic pages. O

I need Custom Login Page for Sharepoint 2013 with Active Directory Project Description: I would like to prepare a webpart or an application for Sharepoint 2013 foundation.

i would like to learnd API''s how they works for advance programming in vb.net