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

📄 global.asax

📁 ASP_NET程序设计教程 源代码 冶金工业出版社 肖金秀 冯沃辉 陈少涌
💻 ASAX
字号:
<script language="VB" runat=server> 
'相关方法

    Sub Application_Start(Sender As Object, E As EventArgs)
	Application.Lock()
	Application("counter") = CType(Application("counter") + 1, Int32)
	Application.UnLock()
    End Sub

    Sub Application_End(Sender As Object, E As EventArgs)
        ' Clean up application resources here
    End Sub

    Sub Application_BeginRequest(Sender As Object, E As EventArgs)
        Response.Write("<h3><font face='Verdana'>Using the Global.asax File</font></h3>")
        Response.Write("Request is Starting...<br>")
    End Sub

    Sub Application_EndRequest(Sender As Object, E As EventArgs)
        Response.Write("Request is Ending...<br>")
    End Sub
    
    Sub Application_Error(Sender As Object, E As EventArgs)
        Context.ClearError()
        Response.Redirect("error.htm")
    End Sub

    Sub Session_Start(Sender As Object, E As EventArgs)
        Response.Write("Session 正在启动...<br>")
    End Sub

    Sub Session_End(Sender As Object, E As EventArgs)
        ' Clean up session resources here
    End Sub

</script>

⌨️ 快捷键说明

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