ASP表单测试者会针对性地显示它的所有表单变量。通过设置来获得表单操作传入的任何变量(这包括传递到页面的url)或者会邮件将被显示的,包括所传递的值。在开发新的HTML表单的时候,这是一个以确保所有的正确传递的在应用程序的变量的很好的首页。
<html>
<title>www.ttasp.net(ASP Form Tester)</title>
<body bgcolor="#FFFFFF">
<% '检查看看是否有任何的查询字符串的存在
if len (request.servervariables("query_string")) >1 then %>
<b>Variables passed via QueryString</b><br>
<!-- The following was passed via a form with a method equal to get, a hyperlink, or
a form action with written varibles -->
<%
'找到每个查询字符串变量的名称和变量值的循环
for each variable_name in request.querystring
variable_value=request.querystring(variable_name)
'如果有查询字符串变量名称和输入值那么写出
response.write variable_name &" = "
response.write variable_value &"<br>" &chr(13)
next ' end for next loop for all querystrings
end if ' end check for querstring values
'检查看看是否有任何表单变量存在
if len(request.form) > 0 then %>
<p>
<b>Variables passed via Post</b><br>
<!-- The following was passed via a form with a method equal to post -->
<% 'Loop to find each variable name and varible value
for each variable_name in request.form
variable_value=request.form(variable_name)
‘如果有一个变量名称和输入值那么写入
response.write variable_name &" = "
response.write variable_value &" <br>" &chr(13)
next ' end for next loop for all
end if ' end check for form values
%>
</body>
</html>