Created a simple user controls which tries to go to the database and get a List of objects which are bound to a ComboBox. When I drag the control from the Toolbox onto a form, I get a null reference. I understand that drag-and-drop will run the default constructor and the load event handler (where I put the code which triggers the exception). Maybe this approach is the problem, too?
Nutshell: How to debug user control when a) it only exceptions on a drag-and-drop in the designer, which b) doesn't allow step-through debugging (?) and c) the Toolbox doesn't seem to respect code changes?
Detail: After dragging and dropping the user control, VS shows a msgbox of most of the stack trace. Going to the top of it is this line (# 208) in my data project:
connStr = ConfigurationManager.ConnectionStrings(" ...
Go to the complete details ...