|
| |
|
|
Mav44
Posts: 197 Joined: 6/25/2006 Status: offline
|
Simple Session Log Out Button - 10/4/2009 16:23:28
I am looking to add a simple session log out button to my page. I have been trying different code but not able to get one to work. I propably have a quote sign out of place Something Like <form>
<input type="button" value="Log Out" onclick="Session.Clear();Session.Abandon();FormsAuthentication.SignOut();Response.Redirect("login.asp")"></form>
|
|
|
|
Mav44
Posts: 197 Joined: 6/25/2006 Status: offline
|
RE: Simple Session Log Out Button - 10/5/2009 9:00:14
Thanks Spooky, I did some reading and that is the way to go. I also found the following script on this site from Rdouglass that does a good job of not caching the page so the user cannot use the back button after logout. I added this to the top of my main pages. <%'@ Language="VBSCRIPT"%> <%'Option Explicit '------------------- Response.Buffer = True Response.ExpiresAbsolute = Now() - 1 Response.AddHeader "Cache-Control", "must-revalidate" Response.AddHeader "Cache-Control", "no-cache" %> Thanks Guys, I love this site.
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|