Skip to content
Related Articles

Related Articles

Improve Article
ASP Dictionary.Remove Method
  • Last Updated : 31 Mar, 2021

The ASP Dictionary.Remove Method is used to remove specified key-value pairs from a Dictionary Object. 

Syntax:

DictionaryObject.Remove(key)

Parameter Value:

  • Key: It is a required attribute. It specifies the key-value pairs that would be removed.

Example Code: 

ASP




<%
dim d,a,i
set d=Server.CreateObject("Scripting.Dictionary")
d.Add "m","mango"
d.Add "z","zebra"
d.Add "c","cat"
  
d.Remove("c")
Response.Write("
<p>Key values:</p>
")
a=d.Keys
for i=0 to d.Count-1
  Response.Write(a(i))
  Response.Write("<br>")
next
  
set d=nothing
%>

Output:

Key Values
m
z
My Personal Notes arrow_drop_up
Recommended Articles
Page :