Ed
asked on
Session variable Timeout asp.net vb
I want to redirect users back to my login page when a certain session variable gets lost expires.
The session variable is called BrokerID
If the value is the session variable gets lost at any time I want to redirect users back to my login page automatically.
The session variable is called BrokerID
If the value is the session variable gets lost at any time I want to redirect users back to my login page automatically.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Solved, thanks.
Solution
If Session("BrokerID") Is Nothing Then
Response.Redirect("login.a spx")
End If
System.Web.Security.FormsA uthenticat ion.SignOu t()
Solution
If Session("BrokerID") Is Nothing Then
Response.Redirect("login.a
End If
System.Web.Security.FormsA
If you want this redirection to happen whether or not user postbacks then you would need to rely on javascript
http://www.codeproject.com/Articles/239798/Session-Timeout-Warning-and-Redirect