Solved

button logout not work ASP.NET C#

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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

739 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