onclick="Button1_OnClick" เป็นการ Add Event ชื่อ onclick ซึ่งจะทำการเรียก Sub หรือ Function ชื่อ Button1_OnClick
---- VB.NET ----
<%@ 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>
<%@ 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>