Dictionary and Session veriable...URGENT

Results 1 to 3 of 3

Thread: Dictionary and Session veriable...URGENT

  1. #1
    Maged Wahba Guest

    Default Dictionary and Session veriable...URGENT

    HI,<BR>I collect the data from two forms and store it in a Dictionary object and then store the object in a session veriable, after that I save this data in a DB.<BR><BR>Some times it saved correctlly, and othertimes it look like a garbage data.<BR><BR>I read it&#039s not recommended to use the dictionary object.<BR><BR>I need an advice?

  2. #2
    Corin Guest

    Default RE: Dictionary and Session veriable...URGENT

    When writing to the dictionary object use CStr() like this<BR><BR>myobject.Add CStr("contentKey"), CStr("contentValue")<BR><BR>I can&#039t explain why, but I had the same problem and this fixed it<BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: Dictionary and Session veriable...URGENT

    It&#039s not recommended to store a dictionary in a Session variable because it&#039s not an "agile" component - see http://msdn.microsoft.com/workshop/server/asp/server03272000.asp#asp for more information about this.<BR><BR>Basically, if you store a Dictionary in Session scope you lock all the requests from that session into a single thread (I think - I&#039m a bit fuzzy on these threading issues) - the only place worse to put it is in Application scope.<BR><BR>HTH<BR><BR>Dunc

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts