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
I want to make new website. I want to make new website. Previous site was not good and I need better one with not only static but using also more details. Skills required:

What is Full Trust? Your code is permitted to do anything in the framework, meaning that all (.Net) permissions are granted. The GAC has Full Trust because it's on the local HD

Need code for Windows 8 and Windows Phone 8 that will http post images to a php file on web server. Project Description: I am working on two projects on both Windows 8/RT and

I want Text/Image printing Counter Project Description: Need your help in our C# programming project. We need to pass this project in two weeks starting from now to pass our

What is a workflow? A workflow is a collection of actions (called activities) that presents the model of a process. A workflow gives a way to explain the order of the execution

What is Array List? An Array is whose size can increase or decrease dynamically. The Array list can hold item of various types. As Array list can increase and decrease his size

Differentiate between the while and for loop in C#. The while and for loops are used to implement those units of code that require to be repeatedly executed, unless the result

I need some a VBA expert urgent Project Description: I require a VBA expert for scraping data from internet. .NET, Excel, Data Processing, Visual Basic

What are standard query operators in LINQ? The standard query operators in LINQ are the extension process that forms the LINQ pattern. These operators form an API that enables

Are you available to discuss about my project. I'd like you to show first and then accept the project provided if we both agree to continue with each other. Skills required: