妙用asp+的global.asax,妙用asp+的global.asax
【 tulaoshi.com - ASP.NET 】
/*End Sub
(本文来源于图老师网站,更多请访问http://www.tulaoshi.com)Sub Application_End(Sender As Object, E As EventArgs)
'我们捎带实现了 站点的当前在线人数
dim intOnlineNumber as integer
intOnlineNumber=cInt(Application("ONLINENUMBER"))-1
Application("ONLINENUMBER")=intOnlineNumber
End Sub
Sub Session_Start(Sender As Object, E As EventArgs)
Application.Lock
intOnlineNumber=cInt(Application("ONLINENUMBER"))+1
Application("ONLINENUMBER")=intOnlineNumber+1
Application.UnLock
End Sub
Sub Session_End(Sender As Object, E As EventArgs)
End Sub
(本文来源于图老师网站,更多请访问http://www.tulaoshi.com)Sub Application_BeginRequest(Sender As Object, E As EventArgs)
'就是这里
response.write("当前访问的页面是 " + Request.FilePath + "<br")
'既然我们可以得到FilePAth 则我们只要把这个参数进行详细的各种各样的统计就可以了
End Sub
Sub Application_EndRequest(Sender As Object, E As EventArgs)
End Sub
</script
'好了一切完结之后,我们访问站点的任意一个aspx 文件,都会在最上方发现一行文字:当前访问的页面是 。。。。
怎么样,还不赶快尝试一下??
作者:豆腐()
来源:http://www.tulaoshi.com/n/20160129/1492294.html
看过《妙用asp+的global.asax》的人还看了以下文章 更多>>