Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.