Logout using vb.net

elf

Active member
Joined
Jun 4, 2003
Messages
37
Can anyone helps mi with this..
i have create a login page using authentication...
i am now able to login to the others page by logining in 1st...
otherwise if not login it will redirect mi to the login page...
BUT when i logout, i am still able to view the other page by typing the url in browser..

the command i use was FormsAuthentication.SignOut()..
but it doesnt work...

Help!!!!
 
I hope this should work!!!

Use the following sub

Sub logout_Click(sender As Object, e As EventArgs)
FormsAuthentication.SignOut
End Sub

call the above sub from the onclick event of the login button


<asp:Button id="BtnLogout" onclick="logout_Click" runat="server" Width="63px" Text="Logout"></asp:Button>

I hope this will work.

This will work atleast for form authentication

Regards

:)
 
Back
Top