Click here to Skip to main content
14,984,032 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to implement logout functionality using javascript/jquery

Please share your solution information

1 solution

Yes, you will need to create a controller action, if you're using MVC or a generic handler if you're using WebForms. This handler/action will need to call the FormsAuthentication.SignOut method. In jQuery you will need to make an ajax call to this action/handler.

$.post('/url/of/signout/action', null, function(data) {
   //handle successful logout

For more info :

How to logout with jquery or just javascript using form authentication?[^]

I hope this will help to you.

[Edit member="Tadit"]
Link text added to reflect the article title.

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