asp.net (vb)统计在线人数

来源:百度知道 编辑:UC知道 时间:2024/06/23 03:27:11
asp.net做网页,语言是vb,怎么统计在线人数?
最好有源码.

.asax

给你一个例子:
Imports System.Web
Imports System.Web.SessionState
Imports System.IO

Public Class Global
Inherits System.Web.HttpApplication

#Region " 组件设计器生成的代码 "

Public Sub New()
MyBase.New()

'该调用是组件设计器所必需的。
InitializeComponent()

'在 InitializeComponent() 调用之后添加任何初始化

End Sub

'组件设计器所必需的
Private components As System.ComponentModel.IContainer

'注意: 以下过程是组件设计器所必需的
'可以使用组件设计器修改此过程。
'不要使用代码编辑器修改它。
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
components = New System.ComponentModel.Container()
End Sub

#End Region

Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' 在应用程序启动时激发
Application("GuestCounter") = 0