Display the number of users sessions currently active your website.

Using the Session_Start and Session_End Events

Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)

' Fires when the session is started

Application("UserCount") = Application("UserCount") + 1

End Sub

Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)

' Fires when the session ends

Application("UserCount") = Application("UserCount") - 1

End Sub

To Display UserCount, add a Label Control to the We

bForm, name it lblUserCount

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

'Put user code to initialize the page here

Me.lblUserCount.Text = "User(s) online " & Application("UserCount")

End Sub