Explain how to access Viewstate values of this page in the next page?

Explain how to access Viewstate values of this page in the next page?



-PreviousPage property is set to the page property of the nest page to get the value of viewstate for the page in the next page.

Page employee = this.PreviousPage;

-Then a control can be found from the previous page and its state can be read.

Label employeeLabel = poster.findControl("empLabel");
string lbl = employeeLabel.Text;
Post your comment