現在の Web 要求に対する HttpResponse オブジェクトを取得します。
名前空間: System.Web.UI
アセンブリ: System.Web (system.web.dll 内)
構文
'宣言
Public ReadOnly Property Response As HttpResponse
'使用
Dim instance As UserControl
Dim value As HttpResponse
value = instance.Response
public HttpResponse Response { get; }
public:
property HttpResponse^ Response {
HttpResponse^ get ();
}
/** @property */
public HttpResponse get_Response ()
public function get Response () : HttpResponse
適用できません。
プロパティ値
UserControl インスタンスを格納している Page に関連付けられた HttpResponse オブジェクト。
使用例
Response プロパティを使用して、ユーザー コントロールが実行されている Web サーバー コンピュータの名前を書き込む例を次に示します。myControl.Response.Write
構文が、myControl.Server.Machinename
構文で取得する情報を表示するようにユーザー コントロールに指示しています。
myControl.Response.Write("<br /><b>The server code is running on machine</b> : " + myControl.Server.MachineName)
Dim actualServerPath As String = myControl.MapPath(myControl.Request.Path)
myControl.Response.Write("<br /><b>The server code is running on machine</b> : " + myControl.Server.MachineName);
string actualServerPath = myControl.MapPath(myControl.Request.Path);
myControl.get_Response().Write("<br /><b>The server code is"
+ "running on machine</b> : "
+ myControl.get_Server().get_MachineName());
String actualServerPath =
myControl.MapPath(myControl.get_Request().get_Path());
プラットフォーム
Windows 98,Windows Server 2000 SP4,Windows CE,Windows Millennium Edition,Windows Mobile for Pocket PC,Windows Mobile for Smartphone,Windows Server 2003,Windows XP Media Center Edition,Windows XP Professional x64 Edition,Windows XP SP2,Windows XP Starter Edition
Microsoft .NET Framework 3.0 は Windows Vista,Microsoft Windows XP SP2,および Windows Server 2003 SP1 でサポートされています。
バージョン情報
.NET Framework
サポート対象 : 3.0,2.0,1.1,1.0
参照
関連項目
UserControl クラス
UserControl メンバ
System.Web.UI 名前空間
HttpResponse
Page.Response プロパティ