Search code examples
c#.netasp.netviewstate

Is there a way to expire the viewstate?


I want to know is there any way to expire the viewstate after a particuler given time.


Solution

  • Have you tried using Session instead. It will be better security than placing an expiration date into the ViewState which can be modified by the user. Sessions have a default expiration of 20 minutes, but you can modify that.