Properties and Methods of The Request Object
Properties and Methods of The Request Object
Property Description
Method Description
Equals(Object) Determines
whether the
specified object is
equal to the
current object.
(Inherited from
object.)
MapImageCoordinate Maps an
s incoming image-
field form
parameter to
appropriate x-
coordinate and y-
coordinate
values.
Response Object
The Response object represents the server's response to the client request. It is an
instance of the System.Web.HttpResponse class.
In ASP.NET, the response object does not play any vital role in sending HTML text to
the client, because the server-side controls have nested, object oriented methods for
rendering themselves.
However, the HttpResponse object still provides some important functionalities, like the
cookie feature and the Redirect() method. The Response.Redirect() method allows
transferring the user to another page, inside as well as outside the application. It
requires a round trip.
Properties and Methods of the Response Object
The following table provides some noteworthy properties of the Response object:
Property Description
Method Description
AppendCookie Infrastructure
adds an HTTP
cookie to the
intrinsic cookie
collection.
Equals(Object) Determines
whether the
specified
object is equal
to the current
object.
Pics Appends a
HTTP PICS-
Label header
to the output
stream.
Redirect(String) Redirects a
request to a
new URL and
specifies the
new URL.
SetCookie Updates an
existing cookie
in the cookie
collection.
ToString Returns a
String that
represents the
current Object.
Write(Char) Writes a
character to an
HTTP
response
output stream.
Write(Object) Writes an
object to an
HTTP
response
stream.
Example
The following simple example has a text box control where the user can enter name, a
button to send the information to the server, and a label control to display the URL of
the client computer.
The content file:
<%@ Page Language="C#" AutoEventWireup="true"
CodeBehind="Default.aspx.cs"
Inherits="server_side._Default" %>
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
if (!String.IsNullOrEmpty(TextBox1.Text)) {