Share via


UserAgent Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets the user agent presented by the client.

Namespace:  System.Net
Assembly:  System.Http (in System.Http.dll)

Syntax

'Declaration
Public ReadOnly Property UserAgent As String
public string UserAgent { get; }
public:
property String^ UserAgent {
    String^ get ();
}
member UserAgent : string with get
function get UserAgent () : String

Property Value

Type: System. . :: . .String
A String object that contains the text of the request's User-Agent header.

Remarks

The User-Agent header typically contains text that identifies the name and version number of the software used to generate the request.

For a complete list of request headers, see the HttpRequestHeader enumeration.

The UserAgent is null when there is no User-Agent header in the request.

.NET Framework Security

See Also

Reference

HttpListenerRequest Class

System.Net Namespace