Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to expire a asp.net web page after 30 min
Posted

You can use the session state's timeout property to force the page data (stored within that session) to expire after a set interval of time e.g. explained here[^].
 
Share this answer
 
Comments
Sandeep Mewara 10-May-12 1:49am    
My 5!
Abhinav S 10-May-12 2:13am    
Thanks buddy.
hi try this

using sessionstate in webconfig

XML
<sessionState cookieless="UseCookies" timeout="20" regenerateExpiredSessionId="true" useHostingIdentity="true">
   </sessionState>

it will expire for 20 minutes

and in appsettings
<add key="dbConn" value="Data Source=ythisbug;User ID=sa;Password=password;Pooling=True;Max Pool Size=200;Connect Timeout=200" />



try this..
All The Best..
 
Share this answer
 
Response.Cookies("whereq").Expires = DataTime.Now;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900