Click here to Skip to main content
15,889,808 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
how to create and display users online in asp.net,c#?
Posted

Couple of articles that should help you get started -
Online active users counter in ASP.NET[^]
http://dotnetslackers.com/articles/aspnet/Tracking-User-Activity.aspx[^]

Here is another one, which can show you the list of users online[^].
 
Share this answer
 
CREATE A GRID LIKE THIS AND GIVE TWO BUTTONS GREEN AND RED IN A FOLDER

img...................



<asp:gridview id="dgvUsers" runat="server" pagesize="5" width="158px" autogeneratecolumns="False" xmlns:asp="#unknown">
DataKeyNames="status" OnRowDataBound="dgvUsers_RowDataBound" GridLines="None"
ShowHeader="False">
<columns> <asp:templatefield>
<itemtemplate>
 <asp:image id="imgGreen" runat="server" height="16px" imageurl="~/Img/green.jpg">
Width="16px" />
<asp:image id="imgRed" runat="server" height="16px" imageurl="~/Img/red.jpg">
Width="16px" />

<itemstyle horizontalalign="Center">

<asp:boundfield datafield="USERNAME" headertext="USERNAME" />
<asp:boundfield datafield="Status" headertext="Status" visible="False" />
<emptydatatemplate>
<asp:image id="Image1" runat="server" imageurl="~/Img/green.jpg" />




use a timer to bind the grid with the datatable from the database.
<asp:timer id="tmrUser" ontick="tmrUser_Tick" runat="server" interval="30000" xmlns:asp="#unknown">

call the databind function in timer tick event.. and change the interval to change refresh time...I suggest to put the grid in an update pannel.....

HOPE this will Work...!!!!!!!!!!!!!
 
Share this answer
 
v2
Hiiii,

Please check this link..........
Online active users counter in ASP.NET[^]
 
Share this answer
 
Comments
Manfred Rudolf Bihy 12-Aug-11 10:45am    
One period '.' and one 'i' would suffice!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900