troubleshooting Question

Compiler Error Message: CS0122

Avatar of lenmor
lenmor asked on
4 Comments1 Solution1031 ViewsLast Modified:
Hi, I am trying to add a eventhandler to a dropdown, getting this error:

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0122: 'System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(System.EventArgs)' is inaccessible due to its protection level

Source Error:


Line 66:     dropProject.ID = "DropDown_Project";
Line 67:     dropProject.AutoPostBack = true;
Line 68:     dropProject.OnSelectedIndexChanged += new EventHandler(this.dropProject_Click);

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros