Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to persist the viewstate between pages in ASP.NET?

I have a button (view state enabled) in Master web page and set it to visible=false in one of the child web pages. If a second child page is opened, the button state (visible=false) is not persisting.

It seems viewstate is only valid for one page and is not transferred to other web pages. Is there some kind of trick to make viewstate global for all web pages?

like image 892
Tomas Avatar asked Dec 03 '22 02:12

Tomas


1 Answers

No, viewstate is page specific. You will need to use something like a session variable or a querystring parameter to pass your state between pages.

like image 75
tomfanning Avatar answered Dec 24 '22 01:12

tomfanning