Link to home
Start Free TrialLog in
Avatar of Alex E.
Alex E.

asked on

button logout not work ASP.NET C#

I have this button in asp.net c# webapp:

                 <asp:Button id="Button34" 
           Text="Exit"
           Font-Bold="true" 
           ForeColor="#990033"
           OnClick="Exit_Click"
           runat="server">
       </asp:Button> 

Open in new window


In code behind I have:

    private void Exit_Click(object sender, System.EventArgs e)
    {
        FormsAuthentication.SignOut();
        Response.Redirect("login.aspx", true);
    }

Open in new window


And the system give me this error:

"Error      3      'menugeneral.Exit_Click(object, System.EventArgs)' is inaccessible due to its protection level"

What could be the problem or how can be fixed?

I hope someone can help.
ASKER CERTIFIED SOLUTION
Avatar of Steven Kribbe
Steven Kribbe
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Alex E.
Alex E.

ASKER

worked thank you