global.asax
来自「Code for VB.NET教程源码 很好的源码」· ASAX 代码 · 共 33 行
ASAX
33 行
<%@ Import namespace="System.Diagnostics" %>
<Script language="VB" runat=server>
Public Sub Application_OnResolveRequestCache()
Response.Write("served from cache...<hr size=1>")
End Sub
Public Sub Application_OnUpdateRequestCache()
WriteLog("Updating cache...")
End Sub
Private Sub WriteLog(message As String)
Dim logname As String = "Web_Errors"
If Not EventLog.SourceExists(logname) Then
EventLog.CreateEventSource(logname, logname)
End If
Dim l As New EventLog()
l.Source = logname
l.WriteEntry(message, EventLogEntryType.Information)
End Sub
</Script>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?