开发者

ASP.NET How to kill this session variable instance

开发者 https://www.devze.com 2023-03-26 01:25 出处:网络
Hey I have a session object I just cant seem to destroy or set null again i.e. this is how it is set If HttpContext.Current.Session(\"ASPNETShoppingCart\") Is Nothing Then

Hey I have a session object I just cant seem to destroy or set null again i.e.

this is how it is set

If HttpContext.Current.Session("ASPNETShoppingCart") Is Nothing Then
        Instance = New ShoppingCart()
        Instance.Items = New List(Of CartItem)
        HttpContext.Current.Session("ASPNETShoppingCart") = Instance
    Else
        Instan开发者_如何学Cce = CType(HttpContext.Current.Session("ASPNETShoppingCart"), ShoppingCart)
    End If

And on my logout I have

Session.Abandon()

But when I log in it still remembers how many items i had in my cart from last time ?


http://msdn.microsoft.com/en-us/library/ms524310(v=vs.90).aspx

See the remarks, can it have anything to do with it?

Your code doesn't show where you fill the session variable and how or where you destroy it. Maybe if you post more code i can tell you more.

0

精彩评论

暂无评论...
验证码 换一张
取 消