Page.Response Property
.NET Framework 2.0
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)
Assembly: System.Web (in system.web.dll)
'Declaration Public ReadOnly Property Response As HttpResponse 'Usage 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.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) Response.Cookies.Add(MyCookie)
HttpCookie myCookie = new HttpCookie("LastVisit");
DateTime now = DateTime.get_Now();
myCookie.set_Value(now.ToString());
myCookie.set_Expires(now.AddHours(1));
get_Response().get_Cookies().Add(myCookie);
var myCookie : HttpCookie = new HttpCookie("LastVisit") var now : DateTime = DateTime.Now myCookie.Value = now.ToString() myCookie.Expires = now.AddHours(1) Response.Cookies.Add(myCookie)
Community Additions
ADD
Show: