How to access ViewState value of this page in the next page - ASP.NET

Explain how to access ViewState value of this page in the next page.

PreviousPage property is set to the page property of the nest page to access the viewstate value of the page in the next page.
Page poster = this.PreviousPage;

Once that is done, a control can be found from the previous page and its state can be read.
Label posterLabel = poster.findControl("myLabel");
string lbl = posterLabel.Text;
What is SQL Cache Dependency in ASP.NET?
SQL Cache Dependency in ASP.NET - It is the mechanism where the cache object gets invalidated when the related data or the related resource is modified....
Concepts of Post Cache Substitution in .NET
Concepts of Post Cache Substitution in .NET - It works opposite to fragment caching. The entire page is cached, except what is to be kept dynamic..
Explain the use of localization and Globalization
Use of localization and Globalization - users of different countries, use different languages and others settings like currency, and dates...
Post your comment