Server.CreateObject("Scripting.Dictionary")

This is a discussion on "Server.CreateObject("Scripting.Dictionary")" within the Classic ASP section. This forum, and the thread "Server.CreateObject("Scripting.Dictionary") are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jun 12th, 2006, 20:58
Reputable Member
Join Date: Sep 2003
Location: USA
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
Server.CreateObject("Scripting.Dictionary")

I've been away from ASP for a while and I never used this much anyway. Can the item be an object or does it have to be a string?

For example, could I do this:
Code: Select all
<%
  set myStuff = Server.CreateObject("Scripting.Dictionary")
  set myUser = new UserClass
   myUser.init ("Joe", "Schmoe", "red")
  myStuff.add "user", myUser
I'm guessing not, but I thought I'd ask anyway.

Thanks
Reply With Quote

  #2 (permalink)  
Old Jun 13th, 2006, 11:00
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,612
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: Server.CreateObject("Scripting.Dictionary")

Short and simple: It can be an object, but not the way you coded it.
You must use the 'Set' statement and the Dictionary object's default property.

Code: Select all
<% set myStuff = Server.CreateObject("Scripting.Dictionary") set myUser = new UserClass myUser.init ("Joe", "Schmoe", "red") 'myStuff.add "user", myUser Set myStuff("user") = myUser
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a "tag" system to find relevant "related" pages MrQuestions PHP Forum 3 Mar 20th, 2008 23:06
[SOLVED] Show "Image" Depends On User "Status"? Monie Classic ASP 6 Oct 16th, 2007 01:22
? IS "meta name="robots" content="?" necessary in pages ? Love2Java Starting Out 6 Aug 8th, 2007 13:48
window.opener.document["nameForm"].getElementById("someid").value; doesnt work drpompeii JavaScript Forum 0 Feb 17th, 2007 23:09
Need to build a "Trip" or "Journey Planner" jswebdev PHP Forum 4 Dec 5th, 2005 23:22


All times are GMT. The time now is 22:46.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43