When debugging ASP pages it can are very useful to the exactly what data is being sent when a form is posted. For this reason, I decided to create a handy little function that would display all of the form variable names and values. This function, Formdatadump () has the following definition:
Sub formdatadump (Bolshowoutput, bolendpageexecution)
These two input parameters are Boolean values. Bolshowoutput, if True, would dump out of the form field names and values for all to. This is has the effect of making your HTML page uglier and harder to Read-therefore, if your are on a live site, Should set this value to False, in which case the form field names and values would be outputted inside of a HTML comment Tag (<!--form field names and values-->), so this they can only seen via a view/source.
The second parameter, bolendpageexecution, determines whether or not a response.end are issued in the Formdatadump () functi On. Response.End, if issued, ends the processing of the ASP page.
Below you'll find the complete code for the Formdatadump () function.
Sub formdatadump (Bolshowoutput, bolendpageexecution)
Dim Sitem
' What linebreak character do we need to-use?
Dim Strlinebreak
If Bolshowoutput Then
' We are showing the output, so set the ' line break character
' To the ' HTML line breaking character
Strlinebreak = "<br>"
Else
' We are nesting ' the data dump in a HTML comment block, so
' Use the Carraige return instead of <br>
' Also start the HTML comment block
Strlinebreak = VbCrLf
Response.Write ("<!--" & Strlinebreak)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.