Mega Code Archive

 
Categories / ASP.Net / Language Basics
 

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>