This documentation is archived and is not being maintained.

ClientTarget::UserAgent Property

Gets the user agent's identification name.

Namespace:  System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

[StringValidatorAttribute(MinLength = )]
[ConfigurationPropertyAttribute(L"userAgent", IsRequired = true)]
public:
property String^ UserAgent {
	String^ get ();
}

Property Value

Type: System::String
The user agent's identification name.

The UserAgent property refers to the userAgent attribute of the add element in the clientTarget section of the configuration file.

The ASP.NET configuration defaults allow customizing pages for various Microsoft Internet Explorer versions. Among them you find the alias uplevel, which tells ASP.NET to send the client HTML and ECMAScript supported by Internet Explorer 4.0 and later, and downlevel, which tells ASP.NET to limit the HTML and script to that supported by earlier browsers than Internet Explorer 4.0.

The following code example shows how to get the UserAgent from the configuration file of an existing Web application.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: