Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ASP.Net scope error
Message
From
26/05/2004 12:08:11
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
ASP.Net scope error
Miscellaneous
Thread ID:
00907407
Message ID:
00907407
Views:
42
Slowly playing and trying things to learn ASP.NET when time permits...

I have a simple page with a submit button so I can see how it goes to the next page (child's play, right?)

I have the following button:
< asp:button id="btnNext" runat="server" Text="Next" Onclick="btnNext_Click" >< /asp:button >
"default.aspx.cs" has the following excerpt:
private void btnNext_Click(object sender, System.EventArgs e)
{
   Response.Redirect("page2.aspx");
}
I get the following compiler error:
myproj.WebForm1.btnNext_Click(object, System.EventArgs)' is inaccessible due to its protection level
If I change "private void" to "public void" it works. Why is private not accessible?


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Next
Reply
Map
View

Click here to load this message in the networking platform