Request
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)
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