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

📄 global.asax

📁 东软内部材料(四)asp等相关的教学案例 
💻 ASAX
字号:
<%@ Import namespace="System.Diagnostics" %>

<Script language="C#" runat=server>
  public void Application_OnResolveRequestCache(){
    Response.Write("served from cache...<hr size=1>");
  }

  public void Application_OnUpdateRequestCache(){
    WriteLog("Updating cache...");
  }
  static private void WriteLog(String message){
    String logname = "Web_Errors";

    if (!EventLog.SourceExists(logname))
      EventLog.CreateEventSource(logname, logname);

    EventLog l = new EventLog();
    l.Source = logname;
    l.WriteEntry(message, EventLogEntryType.Information);
  }
</Script>

⌨️ 快捷键说明

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