新人求解,直接贴代码
ashx:
using System.Web.SessionState;
IRequiresSessionState 都引用了。就是想在cs文件中接收一下在ashx保存的时间
var NowTime = DateTime.Now.ToLocalTime().ToString();
context.Session["NowTime"]= NowTime;
aspx.cs:
public string sj() {
var time= Session["NowTime"].ToString();
return time;
}
ashx里的context.Session和HttpContext.Current.Session都试过了,还是报错,求解求解