Re: Obsolete methods

  •  07-27-2012, 7:29 AM

    Re: Obsolete methods

    Hi rtbike,
     
    Please try the example code below to update the chat room
     
    1. <%@ Page Language="C#" %>  
    2.   
    3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
    4.   
    5. <script runat="server">  
    6.     protected void btnUpdate_Click(object sender, EventArgs e)  
    7.     {  
    8.         foreach (CuteChat.LobbyInfo lobby in CuteChat.ChatApi.GetLobbyInfoArray())  
    9.         {  
    10.             if (lobby.Lobby.Integration == "" || lobby.Lobby.Integration == null)  
    11.             {  
    12.                 if (lobby.Lobby.Title == "MyRoomName")  
    13.                 {  
    14.                     CuteChat.IChatLobby lobby2 = CuteChat.ChatApi.GetLobby(lobby.LobbyId);  
    15.                     lobby2.Title = "New Chat room";  
    16.                     CuteChat.ChatApi.UpdateLobby(lobby2);  
    17.                 }  
    18.   
    19.   
    20.             }  
    21.         }  
    22.     }  
    23. </script>  
    24.   
    25. <html xmlns="http://www.w3.org/1999/xhtml">  
    26. <head runat="server">  
    27.     <title>Untitled Page</title>  
    28. </head>  
    29. <body>  
    30.     <form id="form1" runat="server">  
    31.         <div>  
    32.             <asp:Button ID="btnUpdate" runat="server" Text="Update Chat room" OnClick="btnUpdate_Click" />  
    33.         </div>  
    34.     </form>  
    35. </body>  
    36. </html>  
    Regards,
     
    Ken 
View Complete Thread