Jessica,
Please use the following code:
- <script runat="server">
-
- private void Page_Load(object sender, System.EventArgs e)
- {
- if (! this.IsPostBack)
- {
- ArrayList lobbies=new ArrayList();
- foreach(LobbyInfo lobby in ChatApi.GetLobbyInfoArray())
- {
- if(lobby.Lobby.Integration==""||lobby.Lobby.Integration==null)
- lobbies.Add(lobby);
- }
- this.DataList_Lobbies.DataSource = lobbies;
- this.DataList_Lobbies.ItemDataBound+=new DataListItemEventHandler(rptLobbies_ItemDataBound);
- this.DataList_Lobbies.DataBind();
- }
-
- if (CuteChat.ChatApi.GetLobbyInfoArray().Length < 1)
- Literal1.Text = "<p align='center'><b>Please login as admin and create lobbies in the admin console!</b></p>";
- }
-
-
- 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;
- }
-
- </script>
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