Logout Page issue

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
 
M

mocsoft

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 />
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top