Two types of events for the button (VB) : Events « ASP.net Controls « ASP.NET Tutorial






<%@ Page Language="VB" %>

<script runat="server">
    Protected Sub Button1_Click(ByVal sender As Object, _
       ByVal e As System.EventArgs)

        Response.Write("Postback!")
    End Sub
</script>

<script language="javascript" type="text/javascript">
   function AlertHello()
   { 
      alert('Hello ASP.NET');
   }
</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Button Server Control</title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:Button ID="Button1" 
                    Runat="server" 
                    Text="Button" 
                    OnClientClick="AlertHello()" 
                    OnClick="Button1_Click" />
    </form>
</body>
</html>








3.41.Events
3.41.1.Get event dispacher from event argument
3.41.2.The Button_Command event (VB.net)
3.41.3.The Button_Command event (C#)
3.41.4.Two types of events for the button (C#)
3.41.5.Two types of events for the button (VB)
3.41.6.EventHandler