Example #1
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            if (AMS.Web.RemoteScripting.InvokeMethod(this))            //if this is a callback function return
            {
                return;
            }

            txtMsg.Attributes.Add("onkeypress", "return clickButton(event,'btn')");

            if (!IsPostBack)
            {
                if (Request.QueryString["userid"] != null && Request.QueryString["userid"] != "")
                {
                    otherUser.Value = Request.QueryString["userid"];
                    ChatRoom room = ChatEngine.GetRoom(Session["UserName"].ToString(), Request.QueryString["userid"]);
                    string   s    = room.JoinRoom(Session["UserName"].ToString(), Session["UserName"].ToString());
                    txt.InnerText = s;
                    //	string strScript="<script>startTimer();</script>";
                    //	this.RegisterClientScriptBlock("timerScript",strScript);
                }
                else
                {
                    Response.Write("User id Missing");
                    pnlChat.Visible = false;
                }
            }
        }