in ASP, How can I obtain the names and values of all forms. In fact, this problem is very simple, but many people may not know how to do it, so write it down specially for reference only. In ASP Program , the object used to obtain client data is request. This object provides us with many methods and attributes. For example, there is such a form,
If we want to obtain the value in username, we can write: request. form ("username")
This is a collection, that is to say, all the content in the form is stored in this set
To obtain the value of an element, you only need to specify the element name in request. Form (), for example,
the username above.
what if we want to obtain all the values in the set? That's very simple. You don't need to keep up with anything. Simply write request. Form
to get the names and values of all elements in the set. The following is a statement for Set Operations:
<%
for each OBJ in request. form
response. write OBJ & "& request. form (OBJ) & "
"
next
%>