Open In App

ASP Items Method

Improve
Improve
Like Article
Like
Save
Share
Report

The ASP Items Method is used to return an array of all the items currently in a Dictionary object.

Syntax:

DictionaryObject.Items

Example: The below code demonstrates the ASP Dictionary.Items Method. 

ASP




<%
dim dict,arr,i
set dict=Server.CreateObject("Scripting.Dictionary")
  
'Add values to the dictionary
dict.Add "g","geeks"
dict.Add "c","coding" 
dict.Add "p","placements"
  
'Getting the items of the dictionary
arr=dict.Items
  
Response.Write("The values in the dictionary are:")
  
'Looping through the items
for i=0 to dict.Count-1
  Response.Write("<br> Value: " & arr(i))
next
  
set dict=nothing
%>


Output:

The values in the dictionary are:
Value: geeks
Value: coding
Value: placements

Last Updated : 19 Mar, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads