A good article to help you achieve your goal:
User Controls in Visual C # .NET 
Step 1: Create an event handler in your control as shown below.
public event SubmitClickedHandler SubmitClicked; // Add a protected method called OnSubmitClicked(). // You may use this in child classes instead of adding // event handlers. protected virtual void OnSubmitClicked() { // If an event has no subscribers registered, it will // evaluate to null. The test checks that the value is not // null, ensuring that there are subscribers before // calling the event itself. if (SubmitClicked != null) { SubmitClicked(); // Notify Subscribers } } // Handler for Submit Button. Do some validation before // calling the event. private void btnSubmit_Click(object sender, System.EventArgs e) { OnSubmitClicked(); }
Step 2: Use the event on the page where you register your control. The following code will be part of your page where your control is registered. If you register it, it will be activated by the submit button of the control.
Pranay Rana May 22 '12 at 6:19 a.m. 2012-05-22 06:19
source share