public static void setUserInfo(UserInfo ObjUserInfo, bool ClearSess = true) { try { HttpContext.Current.Session.Clear(); HttpContext.Current.Session.RemoveAll(); //HttpContext.Current.Session.Abandon(); HttpContext.Current.Session["UserInfo"] = ObjUserInfo; if (!String.IsNullOrEmpty(ObjUserInfo.OrdId)) { OrderID.SetOrderID(ObjUserInfo.OrdId); } } catch (Exception) { } }