Click event handler with Custom Control Button
问题 I'm creating an ASP.NET Custom Control for my web application which is basically an ASP.NET Button control contained inside multiple <div> elements (for styling purposes). How can I create a Click event handler for my custom control so that my control acts as an ASP.NET Button? Ie. <cc:Button id="myButton" runat="server" Text="Submit" /> Sub myButton_Click(sender as object, e as EventArgs) Handles myButton.Click End Sub 回答1: In the code behind, declare an event in your class: Public Event