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

📄 global.asax

📁 asp.net经典案例资料
💻 ASAX
字号:
<%@ Import Namespace="System.IO" %>

<script language="C#" runat="server">
public void Application_EndRequest(object sender, EventArgs arg)
{
  Hashtable fileCount = HashFile.ReadHashtableFromFile(Server.MapPath("FileCount.txt"));

  if(fileCount[Request.FilePath] == null)
    fileCount[Request.FilePath] = 1;
  else
    fileCount[Request.FilePath] = 
      (int.Parse((string)fileCount[Request.FilePath]) + 1).ToString();

  HashFile.WriteHashtableToFile(fileCount, Server.MapPath("FileCount.txt"));
}
</script>

⌨️ 快捷键说明

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