Logout Page issue

  • Thread starter Thread starter Lav KG
  • Start date Start date
L

Lav KG

Hi,

I want a user to be redirected to the Login page once he logs out of a
web portal.
Can anyone tell me how I need to go about it?

Thanks in advance
Lav KG
 
if your using sessions to control the login then ur in luck, this is
some simple code i have used before to remove the login credentials and
redirect the user to a given page:

Session.RemoveAll
Response.Redirect("login_page.aspx")


However if you are using sessions to provide login facilities you
shouldnt be. Asp.Net 2 has a new suite of login controls which are
excellent once you get familar with them. If your using these login
controls then its just a matter of displaying this control with the
logoutAction specified

<asp:LoginStatus ID="LoginStatus1" runat="server"
LogoutAction=RedirectToLoginPage />
 
Back
Top