看我写的一段测试代码:
<%
Session("abc")="a"
Session("d")="ddd"
Response.Write("<br>"& Session("abc"))
Session.Contents.remove("abc")
Response.Write("<br>"& Session("abc") &","& Session("d"))
Response.Write("<p>")
Dim item
For Each item In Session.Contents
Response.Write("<br>"& item &","& Session.Contents(item))
Next
%>
contens集合的remove方法删除指定的值,使用removeall方法删除全部值