Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

Error logging out using asp:LoginStatus

$
0
0

Hello,

Im doing a project at the moment and have run into a very annoying, and for me unlogical error, so hopefully some of you can help me out.

I have created a masterpage where I have given the user the opportunity to log in and log out from the masterpage. Logging in redirects the user to a login page without problems, and the user logs in without problems. But when I am done browsing around and press the "log out" link (on the masterpage) I gets this error:

ErrroLoggingOut

The errormessage says: "There was an Microsoft JSccript-runningerror: The value of the ability 'value' cannot be defined: The object is null or not defined."

The code I have used is:

<asp:LoginStatus ID="LoginStatus1" runat="server" LoginText="Log ind" LogoutText="Log ud" OnLoggedOut="LoginStatus1_LoggedOut" />



This is whats inside the <form> tags on the masterpage.

In the codebehind I have this method:

        protected void LoginStatus1_LoggedOut(object sender, EventArgs e)
        {
          Response.Redirect("/Default.aspx", false);
        }

Hope somebody knows what to do.
If there is any questions that might help you help me, then please ask! :)

Kind regards, Adam

(this is a copy of a thread I made in the webforms section - I think it is more appropriate to post it in this section)


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>