📄 asp_ref_request.asp@output=print
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ASP Request Object</title>
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Keywords" content="xml,tutorial,html,dhtml,css,xsl,xhtml,javascript,asp,ado,vbscript,dom,sql,colors,soap,php,authoring,programming,training,learning,beginner's guide,primer,lessons,school,howto,reference,examples,samples,source code,tags,demos,tips,links,FAQ,tag list,forms,frames,color table,w3c,cascading style sheets,active server pages,dynamic html,internet,database,development,Web building,Webmaster,html guide" />
<meta name="Description" content="Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building." />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "../../https@ssl./default.htm" : "../../www./default.htm");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3855518-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</head>
<body>
<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>
<h1>ASP Request Object</h1>
<a href="asp_ref_response.asp"><img border="0" alt="previous" src="../images/btn_previous.gif" width="100" height="20" /></a>
<a href="asp_ref_application.asp"><img border="0" alt="next" src="../images/btn_next.gif" width="100" height="20" /></a>
<hr />
<p class="intro">The ASP Request object is used to get information from the user.</p>
<hr />
<h2>QueryString Collection Examples</h2>
<p><a target="_blank" href="showasp.asp@filename=demo_simplequerystring">Send query information
when a user clicks on a link</a><br />
This example demonstrates how to send some extra query information to a page
within a link, and retrieve that information on the destination page (which is,
in this example, the same page).</p>
<p><a target="_blank" href="showasp.asp@filename=demo_simplereqquery">A QueryString collection
in its simplest use</a><br />
This example demonstrates how the <b>QueryString </b>collection retrieves the values from a form. The form uses the GET
method, which means that the information sent is visible to everybody (in the
address field). The GET method also limits the amount of information that can be
sent.</p>
<p><a target="_blank" href="showasp.asp@filename=demo_reqquery">How to use information from
forms</a><br />
This example demonstrates how to use the values retrieved from a form. We use the <b>QueryString
</b>collection. The form uses the get method.</p>
<p><a target="_blank" href="showasp.asp@filename=demo_reqquery2">More information from a form</a><br />
This example demonstrates what the <b>QueryString </b>contains if several input
fields have the same name. It shows how to separate input fields with equal
names from each other. It also shows how to use the <b>Count</b> keyword to
count the "name" property. The form uses the get method.</p>
<h2>Form Collection Examples</h2>
<p><a target="_blank" href="showasp.asp@filename=demo_simpleform1">A form collection in its simplest use</a><br />
This example demonstrates how the <b>Form</b> collection retrieves the values from a form. The form uses the POST
method, which means that the information sent is invisible to others, and it
has no limits (you can send a large amount of information).</p>
<p><a target="_blank" href="showasp.asp@filename=demo_simpleform">How to use information from forms</a><br />
This example demonstrates how to use the values retrieved from a form. We use the <b>Form </b>collection.
The form uses the post method.</p>
<p><a target="_blank" href="showasp.asp@filename=demo_form2">More information from a form</a><br />
This example demonstrates what the <b>Form </b>collection contains if several
input fields have the same name. It shows how to separate input fields with
equal names from each other. It also shows how to use the <b>Count</b> keyword
to count the "name" property. The form uses the post method.</p>
<p><a target="_blank" href="showasp.asp@filename=demo_radiob">A form with radio buttons</a><br />
This example demonstrates how to interact with the user through radio buttons,
with the <b>Form</b> collection. The form uses the post method.</p>
<p><a target="_blank" href="showasp.asp@filename=demo_checkboxes">A form with checkboxes</a><br />
This example demonstrates how to interact with the user through checkboxes,
with the <b>Form</b> collection. The form uses the post method.</p>
<h2>Other Examples</h2>
<p><a target="_blank" href="showasp.asp@filename=demo_server">Get the server variables</a><br />
This example demonstrates how to find out the visitors (yours) browser type, IP address, and more with the <b>ServerVariables</b>
collection. </p>
<p><a target="_blank" href="showasp.asp@filename=demo_cookies">Create a welcome cookie</a><br />
This example demonstrates how to create a Welcome Cookie with the <b>Cookies</b> Collection.</p>
<p><a target="_blank" href="showasp.asp@filename=demo_totalbytes">Find the total number of bytes the user sent</a><br />
This example demonstrates how to use the <b>TotalBytes</b> property to find
out the total number of bytes the user sent in the Request object.</p>
<hr />
<h2>Request Object</h2>
<p>When a browser asks for a page from a server, it is called a request. The ASP Request
object is used to get information from the user.
Its collections, properties, and methods are described below:</p>
<h3>Collections</h3>
<table class="ex" cellspacing="0" border="1" width="100%" cellpadding="3">
<tr valign="top">
<th width="25%" align="left">Collection</th>
<th width="75%" align="left">Description</th>
</tr>
<tr valign="top">
<td>ClientCertificate</td>
<td>Contains all the field values stored in the client certificate</td>
</tr>
<tr valign="top">
<td><a href="coll_cookies_request.asp">Cookies</a></td>
<td>Contains all the cookie values sent in a HTTP request</td>
</tr>
<tr valign="top">
<td><a href="coll_form.asp">Form</a></td>
<td>Contains all the form (input) values from a form that uses the post
method</td>
</tr>
<tr valign="top">
<td><a href="coll_querystring.asp">QueryString</a></td>
<td>Contains all the variable values in a HTTP query string</td>
</tr>
<tr valign="top">
<td><a href="coll_servervariables.asp">ServerVariables</a></td>
<td>Contains all the server variable values</td>
</tr>
</table>
<h3>Properties</h3>
<table class="ex" cellspacing="0" border="1" width="100%" cellpadding="3">
<tr valign="top">
<th width="25%" align="left">Property</th>
<th width="75%" align="left">Description</th>
</tr>
<tr>
<td valign="top"><a href="prop_totalbytes.asp">TotalBytes</a></td>
<td valign="top">Returns the total number of bytes the client sent in the
body of the request</td>
</tr>
</table>
<h3>Methods</h3>
<table class="ex" cellspacing="0" border="1" width="100%" cellpadding="3">
<tr valign="top">
<th width="25%" align="left">Method</th>
<th width="75%" align="left">Description</th>
</tr>
<tr valign="top">
<td><a href="met_binaryread.asp">BinaryRead</a></td>
<td>Retrieves the data sent to the server from the client as part of a
post request and stores it in a safe array</td>
</tr>
</table>
<br />
<hr />
<a href="asp_ref_response.asp"><img border="0" alt="previous" src="../images/btn_previous.gif" width="100" height="20" /></a>
<a href="asp_ref_application.asp"><img border="0" alt="next" src="../images/btn_next.gif" width="100" height="20" /></a>
<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -