开发者

Session timeout, postback and page validation

We have inherited an ASP.Net site with two search forms on it, one with validation, one without. Each form has its own button -and its own events.

When the page is left open (idle) for about 20 minutes and then submitted using the form without any validation, the page posts back but the events aren't fired. I know that the page is posting back because I've checked that Page.IsPostBack == true.

What's curious about this is that the Page Validators are fired (even though the button clicked has CausesValidation=false) and the page appears to just be refreshed. To me, the fact that it happens after 20 minutes makes me think it's tied into the session timeout and although I could just extend the session timeout (or create a keep-alive/ping system), I would have thought there's a more practical solution to this issue.

Has anyone else come across this issue befor开发者_运维问答e and if so, how did you resolve it?


Yep I was right, we implemented a quick fix to move viewstate into session which is usually fine but because the session was timing out, ViewState was lost and then the events didn't know where to fire.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜