Re: How To : User Control
You should raise the click events for each button in your control so that you can handle them in your form. Take a look at this event bubbling sample on MSDN:
http://msdn.microsoft.com/library/de...trolsample.asp
Re: How To : User Control
Thanks Mendhak.
But the link you provided did not help me much. So can you pls. give me an example or a link for an example so that I can get more r clear soln. My actual problem is i have a user control which is having command button add I placed user control in my class from1.cs when I click on the user control add button, Adding() method should be call in the form1.cs. how to do this task.
Quote:
Originally Posted by mendhak
Re: How To : User Control
You could just do this
Code:
UserControl.Parent.Adding()
But actually I dont think this is good application design! Have alook at mendhaks solution, let your userForm raise an event when Button add is clicked. Have your form subscribe to that event and handle what to do there!
HTH,
Stephan