HttpRequest.RequestType 屬性

定義

取得或設定用戶端使用的 HTTP 資料傳輸方法 (GETPOST)。

public:
 property System::String ^ RequestType { System::String ^ get(); void set(System::String ^ value); };
public string RequestType { get; set; }
member this.RequestType : string with get, set
Public Property RequestType As String

屬性值

字串,代表用戶端送出的 HTTP 叫用類型。

範例

下列程式碼範例會 HtmlEncode 使用 方法來 HTML 編碼 屬性的值 RequestType ,以及 WriteLine 將編碼值寫入檔案的方法。 此程式碼範例是針對 類別提供的較大範例的 HttpRequest 一部分。

// Write request information to the file with HTML encoding.
sw.WriteLine(Server.HtmlEncode(Request.RequestType));
sw.WriteLine(Server.HtmlEncode(Request.UserHostAddress));
sw.WriteLine(Server.HtmlEncode(Request.UserHostName));
sw.WriteLine(Server.HtmlEncode(Request.HttpMethod));
' Write request information to the file with HTML encoding.
sw.WriteLine(Server.HtmlEncode(Request.RequestType))
sw.WriteLine(Server.HtmlEncode(Request.UserHostAddress))
sw.WriteLine(Server.HtmlEncode(Request.UserHostName))
sw.WriteLine(Server.HtmlEncode(Request.HttpMethod))

適用於