Re: How to get User count per room in CuteChat V5

  •  04-09-2009, 10:37 PM

    Re: How to get User count per room in CuteChat V5

    Hi jbergeron9,
     
    You can use 'ClientCount' properties, like below:
     
    private void rptLobbies_ItemDataBound(object sender, DataListItemEventArgs e)
      {
       if (e.Item.DataItem == null)
       {
        return;
       }
       LobbyInfo lobby = (LobbyInfo)e.Item.DataItem;
       HyperLink lnkLobby = e.Item.FindControl("lnkLobby") as HyperLink;
       lnkLobby.NavigateUrl = CuteChat.ChatWebUtility.ResolveResource(this.Context, "Channel.Aspx") + "?Place=Lobby-" +   lobby.Lobby.LobbyId;
       lnkLobby.Target = "_blank";
       String sOnlineChater = lobby.JoinClient(",");
       Label lblOnlineChater = e.Item.FindControl("lblOnlineChater") as Label;
       lblOnlineChater.Text = lobby.ClientCount.ToString();
       lnkLobby.ToolTip = sOnlineChater;
      }
     
     
     
    You can find complete code in chat.aspx of our download examples
     
    download:
     
     
     
    Regards,
     
    Ken
View Complete Thread