当前位置: 首页 > 网络学院 > 服务端脚本教程 > ASP > ASP Request

ASP
ASP 介绍
ASP Install
ASP 语法
ASP 变量
ASP Procedures
ASP Forms
ASP Cookies
ASP Session
ASP Application
ASP #include
ASP Global.asa
ASP Send e-mail
ASP Response
ASP Request
ASP Application
ASP Session
ASP Server
ASP Error
ASP FileSystem
ASP TextStream

ASP Request


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-01   浏览: 724 ::
收藏到网摘: n/a

The ASP Request object is used to get information from the user.
ASP Reques对象是用来从服务器获取信息的。


QueryString Collection Examples
QueryString集合举例

Send query information when a user clicks on a link
当用户点击一个链接的时候将Query信息发送出去
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).
这个例子讲告诉我们如何通过一个链接发送一些特定的QueryString信息,以及如何在目标页面中获得这些的信息。

A QueryString collection in its simplest use
QueryString集合最简单的使用方法
This example demonstrates how the QueryString 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.
这个例子讲告诉我们QueryString集合是如何通过表单获得特定值的。这个表单使用的传送方法是GET,这意味着我们可以从链接地址栏里看到这部分信息。使用GET方式对发送的信息有长度限制。

How to use information from forms
如何使用从表单中获取的信息
This example demonstrates how to use the values retrieved from a form. We use the QueryString collection. The form uses the get method.
这个例子讲告诉我们如何使用从表单中获取的值。我们使用的是QueryString集合,表单发送方式是GET。

More information from a form
如何从表单中获取更多的信息
This example demonstrates what the QueryString 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 Count keyword to count the "name" property. The form uses the get method.
这个例子讲告诉我们,如果一些input输入区的名称(name)相同,那么QueryString将包含的内容。它将展示给我们如何根据input输入区不同的名称来区分不同的input输入区。他还将告诉我们如何使用Count关键词来获取name的数量。我们使用的是Get发送方式。

Form Collection Examples
Form集合举例

A form collection in its simplest use
Form集合最简单的使用方法
This example demonstrates how the Form 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).
这个例子讲告诉我们Form集合是如何通过表单获得特定值的。这个表单使用的传送方法是post,这意味着我们将不能从链接地址栏里看到这部分信息。使用Post方式对发送的信息没有长度限制。

How to use information from forms
如何使用从表单中获取的信息
This example demonstrates how to use the values retrieved from a form. We use the Form collection. The form uses the post method.
这个例子讲告诉我们如何使用从表单中获取的值。我们使用的是Form集合,表单发送方式是Post。

More information from a form
如何从表单中获取更多的信息
This example demonstrates what the Form 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 Count keyword to count the "name" property. The form uses the post method.
这个例子讲告诉我们,如果一些input输入区的名称(name)相同,那么Form将包含的内容。它将展示给我们如何根据input输入区不同的名称来区分不同的input输入区。他还将告诉我们如何使用Count关键词来获取name的数量。我们使用的是Post发送方式。

A form with radio buttons
Radio按钮标单
This example demonstrates how to interact with the user through radio buttons, with the Form collection. The form uses the post method.
这个例子讲告诉我们如何使用Form表单集中的Radio按钮与用户进行互动。这里的Form使用的是post发送方式。

A form with checkboxes
Checkboxes表单
This example demonstrates how to interact with the user through checkboxes, with the Form collection. The form uses the post method.
这个例子讲告诉我们如何使用Form表单集中的checkbox与用户进行互动。这里的Form使用的是post发送方式。

Other Examples
其它例子

Get the server variables
获取服务器变量
This example demonstrates how to find out the visitors (yours) browser type, IP address, and more with the ServerVariables collection. 
这个例子讲告诉我们如何用ServerVariables集合找出访问者浏览器的类型,IP地址以及其它的信息等。

Create a welcome cookie
建立一个欢迎的Cookie
This example demonstrates how to create a Welcome Cookie with the Cookies Collection.
这个例子讲告诉我们如果通过Cookie集合建立一个欢迎的Cookie

Find the total number of bytes the user sent
记录用户发送的字节总数
This example demonstrates how to use the TotalBytes property to find out the total number of bytes the user sent in the Request object.
这个例子讲告诉我们如何使用TotalBytes属性获取用户通过Request对象发送的字节总数。


Request Object
Request对象

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:
我们把浏览器向服务器请求发送页面的过程成为Request(请求)。ASP Request对象是用来从用户这里获取信息的。我们将通过下面的表格把ASP Request对象的集合,属性以及发送方法罗列出来:

Collections

Collection
集合
Description
具体描述
ClientCertificate Contains all the field values stored in the client certificate
包含了所有存储在用户证书里的值
Cookies Contains all the cookie values sent in a HTTP request
包含了所有用HTTP Request发送的Cookie值
Form Contains all the form (input) values from a form that uses the post method
包含了所有用户用Post方式发送的表单值
QueryString Contains all the variable values in a HTTP query string
包含所有加在HTTP询问字符串内的变量值
ServerVariables Contains all the server variable values
包含所有的服务器变量值

Properties
属性

Property
属性
Description
具体描述
TotalBytes Returns the total number of bytes the client sent in the body of the request
返回用户通过Request发送的全部字节总数

Methods
方法

Method
方法
Description
具体描述
BinaryRead Retrieves the data sent to the server from the client as part of a post request and stores it in a safe array
将用户发送到服务器上的数据作为Post请求的一部分,并把它存放在一个安全的数组当中。

评论 (0) All

登陆 | 还没注册?