Do Loop Until with integer value as condition : Do Loop Until « Language Basics « ASP.Net






Do Loop Until with integer value as condition

<script language="vb" runat="server">
Sub Page_load()
  Dim diceRoll As Integer

  Do
    diceRoll = int(rnd * 6) + 1
    Message1.Text = Message1.Text & "Rolled a: " & diceRoll & "<br />"
  Loop Until diceroll = 6
End Sub
</script>

<html>
<head>
<title>Do Loop Example</title>
</head>
<body>
  <asp:label id="message1" runat="server"/>
</body>
</html>

           
       








Related examples in the same category

1.Do Loop Until to append string to asp:Label