HttpRequest.RequestType HttpRequest.RequestType HttpRequest.RequestType HttpRequest.RequestType Property

定義

取得或設定用戶端使用的 HTTP 資料傳輸方法 (GETPOST)。Gets or sets the HTTP data transfer method (GET or POST) used by the client.

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 叫用類型。A string representing the HTTP invocation type sent by the client.

範例

下列程式碼範例會使用HtmlEncode方法,以 HTML 編碼RequestType屬性的值和WriteLine方法,以將編碼的值寫入檔案。The following code example uses the HtmlEncode method to HTML-encode the value of the RequestType property and the WriteLine method to write the encoded value to the file. 這個程式碼範例是針對HttpRequest類別提供之較大範例的一部分。This code example is part of a larger example provided for the HttpRequest class.

// 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))

適用於