Solved

button logout not work ASP.NET C#

Posted on 2016-09-26
2
50 Views
Last Modified: 2016-09-26
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.
0
Comment
Question by:Alex E.
2 Comments
 
LVL 4

Accepted Solution

by:
Steven Kribbe earned 500 total points
ID: 41816464
try to change private into protected
0
 

Author Closing Comment

by:Alex E.
ID: 41816471
worked thank you
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
hbo knew my windows software 4 62
Finding the IIS version 5 22
Need a simple RegEx to search for two words 27 46
asp Google Map 2 32
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question