Bagikan melalui


UserControl.Response Properti

Definisi

HttpResponse Mendapatkan objek untuk permintaan Web saat ini.

public:
 property System::Web::HttpResponse ^ Response { System::Web::HttpResponse ^ get(); };
[System.ComponentModel.Browsable(false)]
public System.Web.HttpResponse Response { get; }
[<System.ComponentModel.Browsable(false)>]
member this.Response : System.Web.HttpResponse
Public ReadOnly Property Response As HttpResponse

Nilai Properti

Objek HttpResponse yang Page terkait dengan yang berisi UserControl instans.

Atribut

Contoh

Contoh berikut menggunakan Response properti untuk menulis nama komputer server Web tempat kontrol pengguna berjalan. Sintaks myControl.Response.Write menginstruksikan kontrol pengguna untuk menampilkan informasi yang diperoleh kontrol dengan myControl.Server.Machinename sintaks.


          myControl.Response.Write("<br /><b>The server code is running on machine</b> : " + myControl.Server.MachineName);
          string actualServerPath = myControl.MapPath(myControl.Request.Path);


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)

Berlaku untuk

Lihat juga