开发者

Is there a way to expire the viewstate?

I want to kn开发者_开发技巧ow is there any way to expire the viewstate after a particuler given time.


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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜