This documentation is archived and is not being maintained.

Page.Response Property

Gets the HttpResponse object associated with the Page object. This object allows you to send HTTP response data to a client and contains information about that response.

Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)

Public ReadOnly Property Response As HttpResponse
Dim instance As Page
Dim value As HttpResponse

value = instance.Response

/** @property */
public HttpResponse get_Response ()

public function get Response () : HttpResponse

Not applicable.

Property Value

The current HttpResponse associated with the page.

Exception typeCondition


The HttpResponse object is not available.

The following code example demonstrates creating a cookie and adding it to the page's HTTP output by using the HttpResponse object.

Dim MyCookie As New HttpCookie("LastVisit")
Dim now As DateTime = DateTime.Now

MyCookie.Value = now.ToString()
MyCookie.Expires = now.AddHours(1)


HttpCookie myCookie = new HttpCookie("LastVisit");
DateTime now = DateTime.get_Now();



var myCookie : HttpCookie = new HttpCookie("LastVisit")
var now : DateTime = DateTime.Now

myCookie.Value = now.ToString()
myCookie.Expires = now.AddHours(1)


Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0