Click here to Skip to main content
15,887,304 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using built in database and login control of ASP.net . But suprisingly no sign out Control is there what to do ?
Posted
Comments
Sushil Mate 10-Jul-13 1:35am    
its there I guess. logged out event.

1 solution

You can call Sign Out method of forms authentication that will clear user identity by removing cookies stored and then redirect to login page.
C#
FormsAuthentication.SignOut();
Response.Redirect("Login.aspx");

This code can be in any handler like your signout link or button whatever.

Regards.. :laugh:
 
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