UserAgent Property

HttpWebRequest.UserAgent Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets or sets the value of the User-agent HTTP header.

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

'Declaration
Public Property UserAgent As String

Property Value

Type: System.String
The value of the User-agent HTTP header. The default value is Nothing.
NoteNote:

The value for this property is stored in WebHeaderCollection. If WebHeaderCollection is set, the property value is lost.

Version Notes

Windows Phone

You can use this member when targeting Windows Phone to specify the User-agent string.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft