How to tell if a user is online via Database

Last post 05-13-2009, 1:31 PM by berr08. 2 replies.
Sort Posts: Previous Next
  •  05-06-2009, 9:24 AM 51876

    How to tell if a user is online via Database

    How can I through the database tell who is online currently.  Basically I need to print out a member list and tell who is online at the moment and who is not and if possible which chat room they are currently in.
     
    Please help! :)
  •  05-13-2009, 1:14 PM 52125 in reply to 51876

    Re: How to tell if a user is online via Database

    Please check chat.aspx.
     
    1. private void rptLobbies_ItemDataBound(object sender, DataListItemEventArgs e)   
    2.     {   
    3.         if (e.Item.DataItem == null)   
    4.         {   
    5.             return;   
    6.         }   
    7.   
    8.         LobbyInfo lobby = (LobbyInfo)e.Item.DataItem;   
    9.   
    10.                    
    11.         HyperLink lnkLobby = e.Item.FindControl("lnkLobby"as HyperLink;   
    12.         lnkLobby.NavigateUrl = CuteChat.ChatWebUtility.ResolveResource(this.Context, "Channel.Aspx") + "?Place=Lobby-" + lobby.Lobby.LobbyId;   
    13.         lnkLobby.Target = "_blank";   
    14.   
    15.         String sOnlineChater = lobby.JoinClient(",");   
    16.   
    17.         Label lblOnlineChater = e.Item.FindControl("lblOnlineChater"as Label;   
    18.         lblOnlineChater.Text = lobby.ClientCount.ToString();   
    19.         lnkLobby.ToolTip = sOnlineChater;   
    20.     }  

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  05-13-2009, 1:31 PM 52127 in reply to 52125

    Re: How to tell if a user is online via Database

    Is there any way to find this information out via the database...basically I have to sort the data before I get to .Net
View as RSS news feed in XML