Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hii all i am using linkbutton on click of which i have written:


MIDL
Session.Abandon();
       Response.Redirect("../index.aspx");


but the session does not expires....why
Posted
Comments
Espen Harlinn 8-Jan-11 7:49am    
Giving a vote of 2 is a slight down vote, indicating that there was something wrong with the answer. Please elaborate ...

This is from the documentation[^]:
When the Abandon method is called, the current Session object is queued for deletion but is not actually deleted until all of the script commands on the current page have been processed. This means that you can access variables stored in the Session object on the same page as the call to the Abandon method but not in any subsequent Web pages.


Regards
Espen Harlinn
 
Share this answer
 
Comments
mylogics 8-Jan-11 7:37am    
thanks i got my solution using
formauthentication.signout().
fjdiewornncalwe 8-Jan-11 13:41pm    
+5 counter because you're absolutely correct.
Espen Harlinn 9-Jan-11 16:46pm    
Thanks Marcus!
Cache issue.
Have a look at this Tip/Trick too.

Browser back button issue after logout(Session issue)[^]
 
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