更新 : 2007 年 11 月
Page オブジェクトに関連付けられている HttpResponse オブジェクトを取得します。このオブジェクトを使用することにより、HTTP 応答データをクライアントに送り、この応答に関する情報を格納できます。
名前空間 :
System.Web.UI アセンブリ :
System.Web (System.Web.dll 内)
<BrowsableAttribute(False)> _
Public ReadOnly Property Response As HttpResponse
Dim instance As Page
Dim value As HttpResponse
value = instance.Response
[BrowsableAttribute(false)]
public HttpResponse Response { get; }
[BrowsableAttribute(false)]
public:
property HttpResponse^ Response {
HttpResponse^ get ();
}
/** @property */
/** @attribute BrowsableAttribute(false) */
public HttpResponse get_Response()
public function get Response () : HttpResponse
HttpResponse オブジェクトを使用して、cookie を作成し、それをページの HTTP 出力に追加するコード例を次に示します。
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.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)
Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。
.NET Framework
サポート対象 : 3.5、3.0、2.0、1.1、1.0
参照