How can I get the value of a session variable inside a static method?

前端 未结 4 962
夕颜
夕颜 2020-11-30 02:50

I am using ASP.NET page methods with jQuery.... How do I get the value of a session variable inside a static method in C#?

protected void Page_Load(object se         


        
4条回答
  •  青春惊慌失措
    2020-11-30 03:18

    HttpContext.Current.Session["..."]

    HttpContext.Current gets you the current ... well, Http Context; from which you can access: Session, Request, Response etc

提交回复
热议问题