Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



What are the Dictionary Object in ASP?

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 10-02-2010
Member
 
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
Reply With Quote
  #2  
Old 10-02-2010
Member
 
Join Date: Feb 2008
Posts: 1,843
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.
Reply With Quote
  #3  
Old 10-02-2010
Member
 
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.
Reply With Quote
  #4  
Old 10-02-2010
Member
 
Join Date: May 2008
Posts: 2,286
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.
Reply With Quote
  #5  
Old 10-02-2010
Member
 
Join Date: Apr 2008
Posts: 1,946
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..!!
Reply With Quote
  #6  
Old 10-02-2010
Member
 
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "What are the Dictionary Object in ASP?"
Thread Thread Starter Forum Replies Last Post
Getting HP AIO Device object server register class object failed message on my system Donoho Hardware Peripherals 6 06-06-2011 01:34 AM
Scope of Object or variable in Object oriented Programming Languages Dėfrim Software Development 3 08-01-2011 05:20 AM
Differents between object and static object Sarfaraj Khan Software Development 5 29-01-2010 12:11 PM
Object reference not set to an instance of an object KAIRU26 Software Development 3 05-09-2009 08:14 PM
Object test = new Object() <-- Java, best way in C++ ADISH Software Development 3 25-10-2008 02:32 PM


All times are GMT +5.5. The time now is 12:10 PM.