This documentation is archived and is not being maintained.

ClientTarget.Alias Property

Gets the user agent's alias.

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

[ConfigurationPropertyAttribute("alias", IsRequired = true, IsKey = true)]
[StringValidatorAttribute(MinLength = )]
public string Alias { get; }

Property Value

Type: System.String
The name used to refer to a specific user agent.

The Alias property refers to the alias attribute of the add element in the clientTarget section of the configuration file.

The ASP.NET configuration defaults include the following aliases:

  • uplevel, which tells ASP.NET to send HTML and ECMAScript that is supported by Internet Explorer 6.0 and later versions.

  • downlevel, which tells ASP.NET to limit the HTML and script to the versions that are supported by browsers earlier than Internet Explorer 6.0.

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

// Get the first client target 
// in the collection.
clientTarget = clientTargets[0];

// Get the alias.
alias = clientTarget.Alias;

msg = String.Format(
      "Alias:      {0}\n",

.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.