For loop inside asp:ImageButton Click event (VB.net) : Image Button « Asp Control « ASP.Net






For loop inside asp:ImageButton Click event (VB.net)

<%@ Page Language="VB" %>
<script runat="server">
    
    Sub ImageButton1_Click(sender As Object, e As ImageClickEventArgs)
      Dim Counter as Integer
      For Counter = 1 To 100  ' Start looping 100 times
        Label1.Text &=  Counter.ToString() & ": I  Love You! " & "<BR />"
      Next
    End Sub

</script>
<html>
<head>
</head>
<body>
    <form runat="server">
        <p>
            <asp:ImageButton id="ImageButton1" onclick="ImageButton1_Click" runat="server" ImageUrl="http://www.java2s.com/style/logo.png"></asp:ImageButton>
        </p>
        <p>
            <asp:Label id="Label1" runat="server"></asp:Label>
        </p>
    </form>
</body>
</html>

           
       








Related examples in the same category

1.Determining the Coordinates Clicked on the Image of an ImageButton Control (VB.net)
2.Simple ImageButton control (VB.net)
3.asp:ImageButton AlternateText (VB.net)
4.Set ImageUrl for asp:Image (VB.net)
5.Use Image Button event (VB.net)
6.Deal with button action event arguments: x, y coordinates (C#)
7.Get Image Button mouse cursor coordinates (C#)
8.Get position from ImageClickEventArgs
9.Link Javascript function to OnClientClick event