While loop : While « Language Basics « ASP.NET Tutorial






<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html>
  <head>
    <title>Loops</title>
    <script runat="server" language="C#">
      void Page_Load()
      {

        int counter = 0;

        while (counter <= 10) 
        {

          messageLabel.Text = counter.ToString();

          counter++;
        }
      }
    </script>
  </head>
  <body>
    <form runat="server">
      <asp:Label id="messageLabel" runat="server"/>
    </form>
  </body>
</html>








2.7.While
2.7.1.While loop
2.7.2.Do while loop
2.7.3.while loop (VB)
2.7.4.Do while loop (VB)