Hi All, I want to know is there any way to expire the viewstate after a particuler given time.
+2
A:
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.
Yuriy Faktorovich
2009-10-15 20:54:52
A:
No, there isn't an expiration feature of the viewstate. But maybe you can set a datetime value to an viewstate variable that you'll check later for your own expiration logic.
Canavar
2009-10-15 20:59:22
The ViewState can be modified by the user.
Yuriy Faktorovich
2009-10-15 21:03:44
A:
It sounds as if you need to use cookies (not exactly like viewstate but can hold data too). You can force cookies to expire or set an expiration date but you cannot do the same view state.
Phil
2009-10-15 21:04:15