Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can i direct a page to login page from one page in asp.net after certain time interval if the user has not used the page for say 15 second .. i have decided to use timer.. is there any alternative to this???
Posted

Take a look at this[^] article.

Essentially, you set a session expiry time, add a refresh header to the page and set the redirect URL. Once the sessions expires, users will be redirected to URL specified in the header.
 
Share this answer
 
Hi,

You can try with the following code:



<title>Page Auto Redirect



This is an auto redirect page.



You can alos do by setting time:
function redirect(){
window.location = $('a').attr('href');
}
setTimeout(redirect, 2000);

Regards,
Shree M.
 
Share this answer
 
Comments
Karthik_Mahalingam 7-Jan-14 1:24am    
Shree i agree with your answer , but OP has mentioned as if the user has not used the page for say 15 second
Codes DeCodes 7-Jan-14 2:00am    
thanks for the code shree... your code holds page for given time frame only like said by karthik... any help to do so will be appreciated

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