Can I store a Scripting Dictionary in a session variable?

前端 未结 2 1900
北恋
北恋 2021-01-14 12:54

I have a classic ASP site where I create a dictionary when the user logs in and then stores that dictionary in a session variable like so...

dim objDict
set          


        
2条回答
  •  北海茫月
    2021-01-14 13:14

    Have you tried in your code doing something like the following when you want to access it?

    Dim objDict
    Set objDict = session("user") 
    Response.Write objDict("id")
    

    Try that and see if it works. I wouldn't think this would be necessary but Classic ASP wasn't exactly the most robust language. What you want to do should be workable, since the Session object simply stores objects.

提交回复
热议问题