ASP Contents.Remove మెథడ్
Contents.Remove మెట్హడ్ కంటెంట్స్ కలెక్షన్ నుండి ఒక ప్రాజెక్ట్ తొలగిస్తుంది.
సింథెక్స్
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") అన్ని x in Application.Contents కోసం Response.Write(x & "=" & Application.Contents(x) & "<br />") next %>
输出:
test1=First test test3=Third test
ఇన్స్టాన్స్ 2
<% Application("test1")=("First test") Application("test2")=("Second test") Application("test3")=("Third test") Application.Contents.Remove(2) అన్ని x in Application.Contents కోసం Response.Write(x & "=" & Application.Contents(x) & "<br />") next %>
输出:
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) & "
") next %>
输出:
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) & "
") next %>
输出:
test1=First test test3=Third test