PDA

View Full Version : Server Variables


dfrancis
11-27-2002, 10:35 AM
I was going to reply to Whammy's post on this subject but that does not seem to be an option... so I offer it here in a new one. I have played with this and have been able to list session and cookies as well...<table>
<%
&nbsp;for each x in request.servervariables
&nbsp;&nbsp;response.write("<tr><td>" & x & "</td><td>")
&nbsp;&nbsp;response.write(request.servervariables(x))
&nbsp;&nbsp;response.write("</td></tr>" & vbCrLf)
&nbsp;next
%>
</table>

Roelf
11-27-2002, 10:49 AM
as far as i can see, this does nothig more than whammys code, change x to item, remove the table layout and it is exactly the same
:confused:

dfrancis
11-27-2002, 11:49 AM
You're right.

whammy
11-28-2002, 12:19 PM
Actually that wasn't really "my" code, anyway... someone else posted it a while back, and I'm sure they got it from somewhere else originally... ;)

You can loop through any collection like that... Request.Form, Request.QueryString, etc.

:D