ວິທິການ ASP Contents.Remove

Reference Manual of Application Object

ວິທິການ Contents.Remove ຖອນບັນດາອີກອານຸຍາດຈາກການກະຈາຍ Contents.

ວິທິການ

Application.Contents.Remove(name|index)
Session.Contents.Remove(name|index)
ມາດຕະຖານ ອະທິບາຍ
name ຊື່ບັນດາອີກອານຸຍາດທີ່ຈະຖອນ.
index ທີມິດຂອງບັນດາອີກອານຸຍາດທີ່ຈະຖອນ.

ກ່ຽວກັບຄວາມຂອງ Application:

ຄວາມທີ1

<%
Application("test1")=("First test")
Application("test2")=("Second test")
Application("test3")=("Third test")
Application.Contents.Remove("test2")
for each x in Application.Contents
 Response.Write(x & "=" & Application.Contents(x) & "<br />")
next
%>

Output:

test1=First test
test3=Third test

ຄວາມທີ2

<%
Application("test1")=("First test")
Application("test2")=("Second test")
Application("test3")=("Third test")
Application.Contents.Remove(2)
for each x in Application.Contents
 Response.Write(x & "=" & Application.Contents(x) & "<br />")
next
%>

Output:

test1=First test
test3=Third test

ກ່ຽວກັບຄວາມຂອງ Session:

ຄວາມທີ1

<%
Session("test1")=("First test")
Session("test2")=("Second test")
Session("test3")=("Third test")
Session.Contents.Remove("test2")
for each x in Session.Contents
 Response.Write(x & "=" & Session.Contents(x) & "<br />")
next
%>

Output:

test1=First test
test3=Third test

ຄວາມທີ2

<%
Session("test1")=("First test")
Session("test2")=("Second test")
Session("test3")=("Third test")
Session.Contents.Remove(2)
for each x in Session.Contents
 Response.Write(x & "=" & Session.Contents(x) & "<br />")
next
%>

Output:

test1=First test
test3=Third test

Reference Manual of Application Object