define Custom Event for WebControl in asp.net
问题 I need to define 3 events in a Custom Control as OnChange , OnSave , and OnDelete . I have a GridView and work with its rows. Can you help me and show me this code? 回答1: Good article which can help you to achieve your task: Custom Controls in Visual C# .NET Step 1: Create the event handler in your control as below. public event SubmitClickedHandler SubmitClicked; // Add a protected method called OnSubmitClicked(). // You may use this in child classes instead of adding // event handlers.