USercontrol events not firing

gallicus

Newcomer
Joined
Dec 31, 1969
Messages
15
Location
at work... probably :-(
OK simple question from someone who has just started writing a user control. I have created a usercontrol which which populates a dataset at the press of a button. I have added this usercontrol to a windows form. I have both the projects in the IDE group. It all compiles and runs OK. However I click the button on the usercontrol (on the form) the button click event on the user control does not fire (Ihave a break point on it). The contructor of the usercontrol does fire. so the control is being intantiated but why doesn't the code run for the button click event?
 
I can think of no reason why the event wouldn't fire, if you're using C# are you sure the event is hooked up properly? Have you tried putting a Messagebox.Show in there?
 
I have tried the messagebox. It does not work so the event is not firing. What do you mean by 'are you sure the event is hooked up properly?' . I think this is where I am falling over, could you explain further. Do I have to connect the button_click event of the usercontrol to the form some how? Never done this before :o

cheers
 
Back
Top