Solved

button logout not work ASP.NET C#

Posted on 2016-09-26
2
36 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

758 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now