0% found this document useful (0 votes)
0 views

Request

The document provides an overview of ASP objects, specifically focusing on the Request object, which is used to retrieve information from users and handle data sent to the server. It details various collections available within the Request object, such as ClientCertificate, Cookies, Form, QueryString, and ServerVariables, along with their usage. Additionally, it describes properties and methods associated with the Request object, including TotalBytes and BinaryRead.

Uploaded by

M Mussawar Sher
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Request

The document provides an overview of ASP objects, specifically focusing on the Request object, which is used to retrieve information from users and handle data sent to the server. It details various collections available within the Request object, such as ClientCertificate, Cookies, Form, QueryString, and ServerVariables, along with their usage. Additionally, it describes properties and methods associated with the Request object, including TotalBytes and BinaryRead.

Uploaded by

M Mussawar Sher
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Request

ASP OBJECTS:
The user sends request to the server and recieves response
from it. In any database application we need to have objects of
different types to get data from the user and to display the data
receives from the database stored on the server. Similarly we need
to access resources of server etc. ASP provides objects for this
purpose. It provides the following intrinsic objects:
REQUEST
RESPONSE
SESSION
APPLICATION
SERVER

REQUEST OBJECT:
When a browser ask for a page from a server, it is called a
request. The ASP Request object is used to get information from the
user. It makes available all the values that the client browser passes
to the server through FORM. The collections, properties and Methods
of Request object are described below:-

COLLECTION:
Page 1
Request
1) ClientCertificate: It makes available a collection of all
field values stored in the client certificate that is sent to the HTTP
request. Before using this collection the server should be configured
to request client certificates.
2) Cookies: It makes available all the cookies stored in the
client browser. We can use the cookies collection to retrieve any
cookie value.
3) Form: It contains all the form(input) values from a Form
submitted using POST method.
4) QueryString: It contain all the variable values in an
HTTP query string. Usually, it is used to access variables sent with
URL after "?" sign or from a Form submitted using GET method.
5) ServerVariables: It contain all the server variable's
values. It also contains a collection of all the HTTP header values
sent from the client browser to the server. You can retrieve the
server variable values and header values.
The syntax to use this collection is
Request.ServerVariables(server_variable)

The syntax to access the variable of any of these collections is;


Request.collections("variable")
The use of word "collections" is optional. So the above syntax can
be written as:
Page 2
Request
Request("variable")
When we use the Form collection, we need to pass the name of the
element that we create in HTML Form as a variable to the request
Object.
For example, if you have created a text box as given below:
<INPUT Type="text" Name="Text1" value=" " >
The Request statement should be: Request.Form("Text1")
OR Request("Text1")

PROPERTIES:
1) TotalBytes: It is read-only property. It returns the total
number of bytes the client browser has sent to the server with the
request.

METHODS:
1) BinaryRead: It is used to retrieve the data sent to the
server from the client as a part of a POST request. It stores all this
data in a safe array (an array that stores information about the
number of dimensions and the bounds of its dimensions).
The syntax of this method is:
Request.BinaryRead(count)
Where count specifies how many bytes to read from the
client.
Page 3
Request

Page 4

You might also like