无休止的会议或回头客的替代选择

时间:2018-07-02 06:07:32

标签: c# asp.net .net session httpcontext

我正在使用HttpContext.Current.Session作为购物篮:

public static BasketClass basket
    {
        get
        {
            if (HttpContext.Current.Session["Basket"] == null)
            {
                HttpContext.Current.Session["Basket"] = new BasketClass();
            }
            return (BasketClass)HttpContext.Current.Session["Sepet"];

        }
    }

没关系。但是当用户关闭会话时即将到期。我想防止它过期。我知道无休止的会议是不可能的。有其他用途吗?

0 个答案:

没有答案