CodeWidgets.com Online Source Code Library -ASP, ASP.NET, VB, VB.Net, Microsoft® Access, Javascript, VBScript, Website Design, Web Applications, Custom Programming Services Available.

 CodeWidgets.com ASP, ASP.NET, VB, VB.Net,
Microsoft® Access, Javascript, VBScript,
Website Design, Web Applications
Shopping Cart (0) Items $0.00      
 CodeWidgets.com
CodeWidgets.com

 

Website Stats to Date

Pages Viewed 6,940,643
Visitors 1,664,751
Widgets Viewed 4,483,408
Since January 1/2003
 
 
Active Users: 33
 

 
PayPal: Secure online payments!
 
Widget #CS0124

Display the number of Active Users on your website (ASP.NET)

Display the number of Active Users on your website (ASP.NET)

Send Link

Questions

Currency Conv.
  Widget Info  
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 WebForm, 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

 Licensing
Format: Download
Online Purchase And Pickup
Licencing Terms: PromoWare
Single Developer Licence.
Re-Distribution Permitted only as part of a compiled Application.This source code is provided to you "as is" without warranty.
CLICK HERE FOR TERMS OF USE
Copyright 2002-2006 Comrie Software Solutions
 Related Widgets

Add Sounds to button events. ASP.NET
Classified Ads Application Template (ASP.NET)
Display the character count from a Textbox Control (ASP.NET)
Website Traffic Stats .Net App (ASP.NET)
WebStore - Online Store Application Template (ASP.NET)

ShoppingCart Empty
Services Contact Info Legal Info
Designated trademarks and brand names are the property of their respective owners.

By accessing this website it is assumed that you agree to the TERMS OF USE.

Send questions or comments regarding this website to  Comrie Software Solutions.

Click here for a complete list of available Widgets.