| Added: September/20/2006 at 9:58am | IP Logged
|
|
|
Guess most people will just laugh at this, but I got stuck and I worked out the answer.
This is the replacement code for "textprotect.aspx" if using C# instead of VB, just replace the script code with this:
< script runat="server"> public void Signout_Click(object sender, EventArgs args) { FormsAuthentication.SignOut(); Session.Abandon(); Response.Redirect("*******.aspx"); } </script>
This works fine for the button code below:
< asp:button id="SignoutButton" onclick="Signout_Click" runat="server" text="Log Out" Font-Size="Smaller" BackColor="Tomato"></asp:button>
Hope this helps anyone trying to logout on a C# page.
Tony
|