<% @ page language="vb" %> <% @ import namespace="system.data" %> <% @ import namespace="system.collections" %> <% dim myheader as namevaluecollection dim i as integer dim cookiesstr as string myheader= request.headers dim totalnum = myheader.count on error resume next response.write ("<center>本程序显示所有的header信息<hr size=1 color=red width=300></center>") for i=0 to totalnum cookiesstr= myheader.getkey(i) response.write ("<p>名字:" & myheader.getkey(i) & " 值:" & myheader.get(cookiesstr)) next %>