[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

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

Posted on 2010-04-06
2
Medium Priority
?
1,958 Views
Last Modified: 2013-11-08
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);
0
Comment
Question by:Corey_819
2 Comments
 
LVL 2

Accepted Solution

by:
Sawiner earned 500 total points
ID: 29964567
From googling a bit it seem to be a bug.
A workaround seem to be adding the event in the Form_Load event instead of in the constructor.

Either way, can you upload the project? I tried recreating the error my self, but I don't seem to get it.

Good luck.
0
 
LVL 1

Author Comment

by:Corey_819
ID: 29965901
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. :)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Hi, this video explains a free download that you can incorporate into your Access databases, or use stand-alone for contact management. Contacts -- Names, Addresses, Phone Numbers, eMail Addresses, Websites, Lists, Projects, Notes, Attachments…
The video will let you know the exact process to import OST/PST files to the cloud based Office 365 mailboxes. Using Kernel Import PST to Office 365 tool, one can quickly import numerous OST/PST files to Office 365. Besides this, the tool also comes…
Suggested Courses
Course of the Month8 days, 19 hours left to enroll

590 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