[WebMethod] static public string UpdateUser(string roomID) { try { ChatRoom room = ChatEngine.GetRoom(roomID); if (room != null) { string res = ""; if (room != null) { string s = string.Empty; //if ((HttpContext.Current.Session["list"] != null) && (HttpContext.Current.Session["list"] != "")) //{ // s = HttpContext.Current.Session["list"].ToString(); // foreach (char data in s) // { // if (data == Convert.ToChar(HttpContext.Current.Session["UserName"])) // { // res = room.UpdateUser(HttpContext.Current.Session["UserName"].ToString(), data); // } // } //} //else //{ res = room.UpdateUser(HttpContext.Current.Session["UserName"].ToString()); string dataset3 = rid; ChatRoom room1 = ChatEngine.GetRoom(dataset3.ToString()); string prevMsgs = room1.JoinRoom1(HttpContext.Current.Session["UserName"].ToString(), HttpContext.Current.Session["UserName"].ToString()); string dataset = string.Empty; Clslogin clslogin = new Clslogin(); DateTime ds1 = DateTime.Now.Date; string ds = ds1.ToString("MM/dd/yyyy") + " " + DateTime.Now.Hour + ":" + DateTime.Now.Minute; if ((HttpContext.Current.Session["UserName"] != null) || (HttpContext.Current.Session["UserName"] .ToString()!= "")) { int userid=Convert.ToInt32(clslogin.groupuserid(HttpContext.Current.Session["UserName"].ToString())); dataset = clslogin.usermessage(userid, ds, rid.ToString()); if (dataset != "") { HttpContext.Current.Response.Redirect("individual.aspx?Channel=" + rid.ToString() + "&User=" + HttpContext.Current.Session["UserName"].ToString() + "", false); HttpContext.Current.ApplicationInstance.CompleteRequest(); //HttpContext.Current.Response.Write("<script type='text/javascript'>detailedresults=window.open('individual.aspx?Channel=" + rid.ToString() + "&User=" + HttpContext.Current.Session["UserName"].ToString() + "',null,'height=300,width=600,resizable=no,scrollbars=no,titlebar=no,status=no,toolbar=no,menubar=no,channelmode=no');</script>"); } else { } } else { } //} } return res; } } catch (Exception ex) { } return ""; }
Response.Redirect
try catch
ThreadAbortException
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)