Arshya
Arshya

Reputation: 690

Notify user of session timeout asp.net VB

I want to notify the user as soon as the session expires.. an alert and redirect to another page. What is the best way to do it considering I have no master page. Although most of the pages inherit the basePage where the property for current user is set.. Can I some how use this page so I wont have to make changes on every page. Also can this be done on server side or do I need to use jQuery?

Please advice

Thanks, Kavita

Upvotes: 0

Views: 2740

Answers (2)

Arshya
Arshya

Reputation: 690

I ended up using

http://www.dotnetcurry.com/ShowArticle.aspx?ID=453

This is not what I wanted but considering the architecture of the project, this was the only feasible option

Upvotes: 0

Kapil Khandelwal
Kapil Khandelwal

Reputation: 16144

You can use jQuery idleTimer plugin for detecting Idle Time & show alert to the user based on that & further redirect the user when session timeouts.

Eg.: You can set session timeout to some value say 30 minutes. Use javascript code to detect user inactivity or idle time.

Detecting Idle Time

If the user is inactive for say 20 minutes, you can show him the popup or link to the user saying do you want to continue your session. If the user click the link his session will continue, otherwise he will be redirected to logout page.

Upvotes: 1

Related Questions