[asp]
<%
Sub Show_InputParams ()
Dim fn, qv, fc, qc
fc = 0
qc = 0
Response.Write "
For each fn in Request.Form()
Response.Write "" & fn & " = " & Request.Form(fn) & "
"
fc = fc + 1
Next
Response.Write "
For each qv in Request.QueryString()
Response.Write "" & qv & " = " & Request.QueryString(qv) & "
"
qc = qc + 1
Next
Response.Write "
Response.End
End Sub
%>
Sub Show_InputParams ()
Dim fn, qv, fc, qc
fc = 0
qc = 0
Response.Write "
Form Inputs
"For each fn in Request.Form()
Response.Write "" & fn & " = " & Request.Form(fn) & "
"
fc = fc + 1
Next
Response.Write "
QueryString Inputs
"For each qv in Request.QueryString()
Response.Write "" & qv & " = " & Request.QueryString(qv) & "
"
qc = qc + 1
Next
Response.Write "
(processing halted)
"Response.End
End Sub
%>
[asp]
To try this out the quickest way, paste that mess above into a new file and save it as "dumbass.asp". Then access it via your browser along with some test parameters (querystring inputs for now). something like "/mysite/dumbass.asp?test1=123&a=def&x=4321"
It should print out something like the following...
Form Inputs
(no form inputs found)
QueryString Inputs
test1 = 123
a = def
x = 4321
3 querystring inputs found
(processing halted)
No comments:
Post a Comment