ClientTarget.UserAgent Property
.NET Framework (current version)
Gets the user agent's identification name.
Assembly: System.Web (in System.Web.dll)
[ConfigurationPropertyAttribute("userAgent", IsRequired = true)] [StringValidatorAttribute(MinLength = 1)] public string UserAgent { get; }
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.
.NET Framework
Available since 2.0
Available since 2.0
Show: