Results 1 to 6 of 6

Thread: What are the Dictionary Object in ASP?

  1. #1
    Join Date
    Aug 2006
    Posts
    162

    What are the Dictionary Object in ASP?

    Hi Friends,
    I have just started doing the tasks in ASP. I have completed the basic programs in ASP. But I don't know what is the Dictionary Object in ASP.?? Please explain me with some examples, so that it will be better for me to understand. Any coding related to the topic would be greatly appreciable. Help me soon..!!
    Processor: AMD Athlon(tm) 64 X2 Dual Core @ ~2.2 GHz
    Memory: 1024MB RAM
    Hard Drive: 200 GB
    Video Card: RADEON X300/X550 Series

  2. #2
    Join Date
    Feb 2008
    Posts
    1,852

    Re: What are the Dictionary Object in ASP?

    The Dictionary object stores information in name/value pairs. The Asp dictionary object allows you to store information in data key, item pairs. The Dictionary object is like an associative array, but with its own built-in functionality. This dictionary object also looks after the basic tasks of storing and manipulating the data, and sizing for the required number of elements. However, the Dictionary object is a more desirable solution to manipulate related data. Also you should know that each item in the Dictionary object is associated with a unique key.

  3. #3
    Join Date
    Nov 2005
    Posts
    1,323

    Re: What are the Dictionary Object in ASP?

    Before using the dictionary object, there are somethings that should be kept in mind. These things are described as follows :
    1. You cannot use key for the another item in the same Dictionary object, since the key is a unique identifier for the corresponding item. If you create a duplicate, then the old value of that object will get overwritten with the new one that you re-placed recently.
    2. Since the dictionary cannot be multidimensional, a value in a Dictionary object can not be an array.

  4. #4
    Join Date
    May 2008
    Posts
    2,297

    Re: What are the Dictionary Object in ASP?

    The following are some Asp Dictionary Object Methods :
    • Add - This method adds a key and item pair to a Dictionary object.
    • Remove - This method is used for removing a key, item pair from a Dictionary object.
    • RemoveAll - This method is used for removing all key, item pairs from a Dictionary object.
    • Items - This method returns an array containing all the items in a Dictionary object.
    • Exists - This method returns True if a specified key exists in the Dictionary object; False if it does not.
    • Keys - This method returns an array containing all existing keys in a Dictionary object.

  5. #5
    Join Date
    Apr 2008
    Posts
    1,948

    Re: What are the Dictionary Object in ASP?

    According to me, you should also know the properties of Asp Dictionary Object. So I have mentioned the properties below :
    1. Count - This property returns the number of items in a collection or Dictionary object.
    2. Item - This property sets or returns an item for a specified key in a Dictionary object.
    3. Key - This property sets a key in a Dictionary object.
    4. CompareMode - This property sets and returns the comparison mode for comparing string keys in a Dictionary object.

    Hope that this will help you..!!

  6. #6
    Join Date
    Jul 2006
    Posts
    442

    Re: What are the Dictionary Object in ASP?

    For creating the dictionary object, you can use the following code :
    Code:
    <%
    Dim objDictionary
    Set objDictionary = CreateObject(Scripting.Dictionary)
    objDictionary.Add "pet", "Cat"
    objDictionary.Add "jeep", "Scorpio"
    
    dim strkey,strvalue
    strkey = "Flower"
    strvalue = "Rose"
    objDictionary.Add strkey,strvalue
    %>
    "When they give you ruled paper, write the other way..." J.R.J.

Similar Threads

  1. Replies: 6
    Last Post: 06-06-2011, 01:34 AM
  2. Replies: 3
    Last Post: 08-01-2011, 06:20 AM
  3. Differents between object and static object
    By Sarfaraj Khan in forum Software Development
    Replies: 5
    Last Post: 29-01-2010, 01:11 PM
  4. Object reference not set to an instance of an object
    By KAIRU26 in forum Software Development
    Replies: 3
    Last Post: 05-09-2009, 08:14 PM
  5. Object test = new Object() <-- Java, best way in C++
    By ADISH in forum Software Development
    Replies: 3
    Last Post: 25-10-2008, 02:32 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,702,156.10594 seconds with 17 queries