Export (0) Print
Expand All

HttpRequest.RequestType Property

Gets or sets the HTTP data transfer method (GET or POST) used by the client.

Namespace: System.Web
Assembly: System.Web (in system.web.dll)

'Declaration
Public Property RequestType As String
'Usage
Dim instance As HttpRequest
Dim value As String

value = instance.RequestType

instance.RequestType = value
/** @property */
public String get_RequestType ()

/** @property */
public void set_RequestType (String value)

public function get RequestType () : String

public function set RequestType (value : String)

Not applicable.

Property Value

A string representing the HTTP invocation type sent by the client.

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

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft