Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello sir.
in my application default session time out period is 20 minutes.
and how to set session time out period for a textbox as 30 minutes.
if any body know please tell me.
thanking you.


sateesh
Posted

Session timeout is website based. You define that in Web.Config file.

You cannot have website session timeout as 20 min utes and a control in the website as 30 minutes timeout!

I would suggest you to modify the session timeout of the website as 30 min, via Web.Config:
XML
<configuration>
   <system.web>
      <sessionState mode="InProc" cookieless="true" timeout="30"/>
      </sessionState>
   </system.web>
</configuration>


To read more about it, look here.[^]
 
Share this answer
 
Comments
sathish.jampala 17-Feb-11 5:24am    
thanks for giving ur reply. forget about my website session timeout period. now i want to set session time out period for a particular control like textbox. how can i change that. this is the question asked TCS.
Sandeep Mewara 17-Feb-11 5:32am    
No, don't forget what I said.

TCS asked and was expecting the same answer what I gave you. They must be testing you if you know it or not.
#realJSOP 17-Feb-11 5:33am    
He gave you that answer already - session timeout applies to the entire web site, NOT individual controls.
#realJSOP 17-Feb-11 5:33am    
Proposed as answer.
sathish.jampala 17-Feb-11 9:54am    
thank you sir. thanx for your reply.
Your fundamentals doesn't seem very clear.

Read these:
Exploring Session in ASP.Net[^]
ASP.NET Session State Overview[^]

Hope that helps! :thumbsup:
 
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