0
會話Session_Start調用和ActionFilterAttribute中的OnActionExecuting之間會發生什麼。在ASP.NET MVC中正在清除的會話
出於某種原因,當我設置是這樣的:
protected void Session_Start(object sender, EventArgs e)
{
Session["GoToBuyPage"] = true;
}
,並嘗試在這裏訪問的ActionFilterAttribute:
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
bool goToPage = (bool)Session["GoToBuyPage"];
它始終是零。任何想法爲什麼?