Link to home
Start Free TrialLog in
Avatar of Corey_819
Corey_819

asked on

Error: Events cannot be set on the object passed to the event binding service because.........

Hello and sorry to be posting a question around errors, but I have looked all over the web for an answer. I have not found a clear answer to why this error happens only in Design time, but not in runtime.

Error:

Events cannot be set on the object passed to the event binding service because a site associated with the object could not be located.      

Click on the Error list and this is the line of code that is pointed too:

ainTree.mainTree.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(mainTree_NodeMouseClick);
ASKER CERTIFIED SOLUTION
Avatar of Sawiner
Sawiner

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Corey_819
Corey_819

ASKER

Funny I looked at that on google and that did not seem to fit but for some reason I read your response tried it and worked. thanks man. :)