views:

149

answers:

2

i have set the session timeout to 20 minutes in IIS level and there is no session entries in the web.config.

How can i know whether my session exprired in my website?

does the state will maintain ? do i can see the values in the text-boxes after the timeout?

+2  A: 

Viewstate remains. Since ASP.Net still relies on good ol' HTTP forms processing, you can just read request.forms to see the posted values.

As far as seeing if the session espired, take the session ID and store it in a hidden input or even a ViewState property, then compare the stored session ID with the 'current' session ID and if they're different then a new session has started.

Kevin Buchan
+2  A: 

Below link show you the implementation of how you can check that new session is created and take the necessary steps

Viewstate will be maintained

Detecting ASPNET_Session_Timeouts

Stackoverflow question answered here

Session Expired

Harryboy