Arrays , Dictionary Objects and Application/Sessio

Results 1 to 2 of 2

Thread: Arrays , Dictionary Objects and Application/Sessio

  1. #1
    Chandan Guest

    Default Arrays , Dictionary Objects and Application/Sessio

    hi,<BR><BR>i have an array of dictionary objects. i would like to store 2 different arrays like this - one in the session and the other in the application through the &#039On_Start&#039 in the global.asa file.<BR><BR>i know that this might result in a performance degradation of the web server, but i do not have many concurrent users and so it&#039s not an immediate concern.<BR><BR>i&#039m a newbie and am not sure how to reference / access a particular &#039Item&#039 of a dictionary in an array. i.e. read/modify the value of Item("3") in c1B(0) ?<BR><BR>Sample :<BR><BR>Sub Application_OnStart()<BR><BR> Dim c1B(2) &#039 Application level object<BR><BR> Set c1B(0) = Server.CreateObject("Scripting.Dictionary")<BR><BR > c1B(0).Add "1", "dp2"<BR> c1B(0).Add "2", "dp2" <BR> c1B(0).Add "3", "dp2"<BR> c1B(0).Add "4" , "dp3" <BR><BR>&#039 .. and so on<BR><BR>Application("cNo1B") = c1B<BR> <BR>End Sub<BR><BR>thanks in advance,<BR>chandan

  2. #2
    Join Date
    Dec 1969

    Default RE: Arrays , Dictionary Objects and Application/Se

    I believe that to access a particular item of a dictionare stored in an array you would do this:<BR><BR>arrayname(Arrayelement)("Dictionaryke y")<BR><BR>c1B(0)("4") would return dp3.<BR><BR>I think, but what do I know?

Posting Permissions

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