Simple For loop (C#) : For Loop « Language Basics « ASP.Net






Simple For loop (C#)

<%@ Page Language="C#" Debug="true" %>
<script runat="server">

    void Page_Load()
    {
         lblMessage1.Text = "";
         for(int i = 1;i<=10;i++)
         {
           lblMessage1.Text += "Attendee Name___________           <br /><br />";
           lblMessage1.Text += "Attendee Age__________            <br /><br /><hr /><br />";
         }
    }

</script>
<html>
<head>
    <title>For Example</title>
</head>
<body>
        <asp:label id="lblMessage1" runat="server"></asp:label>
</body>
</html>

           
       








Related examples in the same category

1.Nest Do Until loop inside For loop (VB.net)