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

📄 result.aspx

📁 asp.net_Lesson7.ASP.NET经典范例50讲.第7讲登场
💻 ASPX
字号:
<html>
  <head>
    <title>Result</title>
    <script runat="server" language="C#">
    void Page_Load()
    {
      // Read score into Hashtable
      Hashtable score = HashFile.ReadHashtableFromFile(Server.MapPath("score.txt"));

      // Read channel into Hashtable
      Hashtable channel = HashFile.ReadHashtableFromFile(Server.MapPath("channel.txt"));

      foreach(object s in channel.Keys)
      {
        if(score[(string)s] == null)
        {
          result.Items.Add((string)channel[s] + ":0");
        }
        else
        {
        result.Items.Add((string)channel[s] + ":" + (string)score[(string)s]);
        }
      }
    }
    </script>
  </head>

  <body>
    <h3>谢谢参与,当前的评选结果为</h3>
    <form id="form2" runat="server">
      <asp:ListBox id="result" width="100" 
                   rows="10" runat="server" />
    </form>
  </body>
</html>

⌨️ 快捷键说明

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