<%
'---------------------------------------------------------------------------
' 程序作用:打印request.form輸入的所有值
'---------------------------------------------------------------------------
Response.Write FormData()
function FormData()
Dim llngMaxFIEldIndex
Dim llngFIEldIndex
Dim llngMaxValueIndex
Dim llngValueIndex
Dim lstrDebug
' Count Form
llngMaxFIEldIndex = Request.Form.Count
' Let user know if Form Do Not exist
if llngMaxFIEldIndex = 0 Then
FormData = "Form data is empty."
Exit function
End if
' Begin building a list of all Form
lstrDebug = "<OL>"
' Loop through Each Form
For llngFieldIndex = 1 To llngMaxFIEldIndex
lstrDebug = lstrDebug & "<LI>" & Server.HtmlEncode(Request.Form.Key(llngFIEldIndex))
' Count the values
llngMaxValueIndex = Request.Form(llngFIEldIndex).Count
' if the FIEld doesn't have multiple values ...
if llngMaxValueIndex = 1 Then
lstrDebug = lstrDebug & " = "
lstrDebug = lstrDebug & Server.HtmlEncode(Request.Form.Item(llngFIEldIndex))
' Else Loop through Each value
Else
lstrDebug = lstrDebug & "<OL>"
For llngValueIndex = 1 To llngMaxValueIndex
lstrDebug = lstrDebug & "<LI>"
lstrDebug = lstrDebug & Server.HtmlEncode(Request.Form(llngFIEldIndex)(llngValueIndex))
lstrDebug = lstrDebug & "</LI>"
Next
lstrDebug = lstrDebug & "</OL>"
End if
lstrDebug = lstrDebug & "</LI>"
Next
lstrDebug = lstrDebug & "</OL>"
' Return the data
FormData = lstrDebug
End function
%>
<%
'-------------------------------------------------------------------------
' 函數功能:輸出所有輸入request.querystring值,用於調試!
'-------------------------------------------------------------------------
Response.Write QueryStringData()
function QueryStringData()
Dim llngMaxFIEldIndex
Dim llngFIEldIndex
Dim llngMaxValueIndex
Dim llngValueIndex
Dim lstrDebug
' Count QueryString
llngMaxFIEldIndex = Request.QueryString.Count
' Let user know if QueryString Do Not exist
if llngMaxFIEldIndex = 0 Then
QueryStringData = "QueryString data is empty."
Exit function
End if
' Begin building a list of all QueryString
lstrDebug = "<OL>"
' Loop through Each QueryString
For llngFieldIndex = 1 To llngMaxFIEldIndex
lstrDebug = lstrDebug & "<LI>" & Server.HtmlEncode(Request.QueryString.Key(llngFIEldIndex))
' Count the values
llngMaxValueIndex = Request.QueryString(llngFIEldIndex).Count
' if the FIEld doesn't have multiple values ...
if llngMaxValueIndex = 1 Then
lstrDebug = lstrDebug & " = "
lstrDebug = lstrDebug & Server.HtmlEncode(Request.QueryString.Item(llngFIEldIndex))
' Else Loop through Each value
Else
lstrDebug = lstrDebug & "<OL>"
For llngValueIndex = 1 To llngMaxValueIndex
lstrDebug = lstrDebug & "<LI>"
lstrDebug = lstrDebug & Server.HtmlEncode(Request.QueryString(llngFIEldIndex)(llngValueIndex))
lstrDebug = lstrDebug & "</LI>"
Next
lstrDebug = lstrDebug & "</OL>"
End if
lstrDebug = lstrDebug & "</LI>"
Next
lstrDebug = lstrDebug & "</OL>"
' Return the data
QueryStringData = lstrDebug
End function
%>