Connecting Tech Pros Worldwide Help | Site Map

redirecting to another page after signing out

Newbie
 
Join Date: Sep 2009
Posts: 2
#1: Sep 28 '09
hii all

I have developed a web site, in that only authorized user can visit the edit user page(secured/edituser.aspx page) and after signing out, that is when the user clicks on logout button, the user is directed automatically to login.aspx page( i have used formsauthentication.singout() statement in the logoutbtn_click event) but actually after singing out i want to direct the user to another page(logout.aspx)

please help.....

thanks a lot...
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,066
#2: Sep 28 '09

re: redirecting to another page after signing out


Make sure that the logout.aspx page is outside of any protected/private folders.

Use the FormsAuthentication.SignOut() method to log out the user (this will remove the authentication ticket).

And then use the Response.Redirect() method to redirect the user to the "logout.aspx" page.

Expand|Select|Wrap|Line Numbers
  1.   FormsAuthentication.SignOut()
  2.   Response.Redirect("logout.aspx")
  3.  
-Frinny
Newbie
 
Join Date: Sep 2009
Posts: 2
#3: Sep 29 '09

re: redirecting to another page after signing out


thanks a lot frinny....
Reply