⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 demo-while.aspx

📁 asp.net1.1入门经典C#.2003
💻 ASPX
字号:
<%@ Page Language="c#" %>
<script runat="server">

    void Page_load()
       {
         // demo of modulo where every third try displays an encouraging message
        Random objRandom = new Random();
        int  DiceRoll = 0;
        byte bytRollCounter = 0;


        while (DiceRoll != 6)
            {
            // check if we need to show the 'keep trying' message

            

            bytRollCounter +=1;
            DiceRoll = Convert.ToInt32(objRandom.Next(6)) + 1;
            Message1.Text += "Rolled a: " + DiceRoll + "<br />";
            }   // end Loop
        Message1.Text += "Got it. Press page refresh to try again.";
       }

</script>
<html>
<head>
    <title>Do...While Loop Example</title>
</head>
<body>
    <asp:Label id="Message1" runat="server"></asp:Label>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -