protected void Page_Load(object sender, EventArgs e) { try { uInfo = (userInfo)Session["_di09USR"]; PublicChat pObj = new PublicChat(); pObj.User_id = uInfo.UserId; pObj.LeaveChatRoom(); } finally { Response.Redirect("~/home.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { topPanel.Visible = !setUsername(); LoadChatRooms(); if (!Page.IsPostBack) { if (isLoggedIn()) { //EXIT USER FROM ANY PRE CHATROOMS PublicChat pObj = new PublicChat(); pObj.User_id = uInfo.UserId; pObj.LeaveChatRoom(); } } }
protected void Page_Load(object sender, EventArgs e) { setUsername(); LoadChatRooms(); if (!Page.IsPostBack) { if (uInfo != null) { //EXIT USER FROM ANY PRE CHATROOMS PublicChat pObj = new PublicChat(); pObj.User_id = uInfo.UserId; pObj.LeaveChatRoom(); } } }
protected void Page_Load(object sender, EventArgs e) { setUsername(); if (!Page.IsPostBack) { //EXIT USER FROM ANY PRE CHATROOMS PublicChat pObj = new PublicChat(); pObj.User_id = uInfo.UserId; pObj.LeaveChatRoom(); //LOAD ALL DETAILS Session[USER_SAVE_STRING] = USER_INIT_PATH; LoadUserDetails(); imgUser.ImageUrl = Session[USER_SAVE_STRING].ToString(); } }
protected override void OnPreInit(EventArgs e) { if (Context.Session != null) { if (Session["_di09USR"] != null) { userInfo uInfo = (userInfo)Session["_di09USR"]; //EXIT USER FROM ANY PRE CHATROOMS PublicChat pObj = new PublicChat(); pObj.User_id = uInfo.UserId; pObj.LeaveChatRoom(); LoginCls logoutObj = new LoginCls(); logoutObj.LogOut(uInfo.UserId); } } Session.Abandon(); Response.Redirect("~/home.aspx", true); }
if (Context.Session != null) { if (Session["_di09USR"] != null) { userInfo uInfo = (userInfo)Session["_di09USR"]; //EXIT USER FROM ANY PRE CHATROOMS PublicChat pObj = new PublicChat(); pObj.User_id = uInfo.UserId; pObj.LeaveChatRoom(); LoginCls logoutObj = new LoginCls(); logoutObj.LogOut(uInfo.UserId); } } Session.Abandon(); Response.Redirect("~/home.aspx", true); } }