在 [WebMethod]中取Seesion值的方法:
把Session[“xx_user”]替换为HttpContext.Current.Session[“xx_user”]即可,HttpContext.Current.Session 和 Session 的区别
他们具有相同的作用,他们将会访问相同的session数据。
如:string czy_str =HttpContext.Current.Session[“xx_user”].ToString().Trim();
在 [WebMethod]中取Seesion值的方法:
把Session[“xx_user”]替换为HttpContext.Current.Session[“xx_user”]即可,HttpContext.Current.Session 和 Session 的区别
他们具有相同的作用,他们将会访问相同的session数据。
如:string czy_str =HttpContext.Current.Session[“xx_user”].ToString().Trim();