0
kicks
Access Viewstate across pages in ASP.NET « Ramani Sandeep's Blog
There was one question during my recent work in one of my ASP.NET Project.
“Is it possible to access the ViewState variable of one page on another page?”
My answer was “No” . Because i have read in books that Viewstate is page specific, it is available only on the same page on which it was created.Once you redirect to another page, the previous page’s viewstate is no longer accessible.
But that is not true. Yes, we can access the viewstate variables across pages. This is only possible if Cross Page Posting or Server.transfer is used to redirect the user to other page. If Response.redirect is used, then ViewState cannot be accessed across pages.