Actually, here is some better code to try. I found it in some of my older files. Save this to something like "testit.aspx" and then display "testit.aspx" inside an iframe. You should be able to pick out something that might help.
<%@ Page Language="VB" %>
<script runat="server">
' Insert page code here
dim cap1, cap2 as string
dim tprop as string
dim thing as string
dim tempvalue as string
Sub Page_Load (sender As Object, e As EventArgs)
'Insert some cookie creation stuff...
Dim cookie As HTTPCookie = New HttpCookie("Info_to_be_Passed")
Dim dt As DateTime = DateTime.Now()
Dim ts As New TimeSpan(0,0,5,0)
cookie.Value = "myDNNCookie"
cookie.Expires = dt.Add(ts)
Response.Cookies.Add(cookie)
cap1="Server Variable"
cap2="Value"
'<table bordercolor="teal" cellspacing="0" cellpadding="2" bgcolor="#ffffc0" border="2">
tprop="<table cellpadding=" & chr(34) & "4" & chr(34) & "bordercolor=" & chr(34) & "teal" & chr(34) & "bgcolor=#ffffc0 border=" & chr(34) & "2" & chr(34) & ">"
response.write(tprop)
response.write("<tbody>")
response.write("<tr><td><b>" & cap1 & "</b></td><td><b>" & cap2 & "</b></td></tr>")
'Send buffered output immediately.
response.flush
for each thing in request.servervariables
tempvalue=request.servervariables(thing)
response.write("<tr><td>" & thing & "</td><td>" & tempvalue & "</td></tr>")
next
response.write("</tbody>")
response.write("</table>")
response.flush
End Sub
</script>
<html>
<head>
<title>Servervariables</title>
</head>
<body vlink="#666666" alink="#666666" link="#666666">
<form runat="server">
<p>
</p>
</form>
</body>
</html>