ASP.NET(vb.net) & Event Handler - How to create event handler in asp.net web server control.
ShotDev Focus:
- ASP.NET & Create Event Handler.
Example
1. Create event under tag control.
<%@ Page Language="VB" %> <script runat="server"> Sub Button1_OnClick(sender as Object, e As EventArgs) ................ End Sub </script> <form runat="server"> <asp:Button id="Button1" onclick="Button1_OnClick" runat="server" Text="Button"></asp:Button> </form>
.
2. Create event under sub and event handles.
<%@ Page Language="VB" %> Sub Button1OnClick(sender as Object, e As EventArgs) Handles Button1.Click End Sub </script> <form runat="server"> <asp:Button id="Button1" runat="server" Text="Button"></asp:Button> </form>
.
.
.