Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

button logout not work ASP.NET C#

Posted on 2016-09-26
2
Medium Priority
?
83 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.
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
Steven Kribbe earned 2000 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

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…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

618 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