System.Web.Configuration.ClientTarget Class

Defines the alias associated with the target user agent for which ASP.NET server controls should render content. This class cannot be inherited.

See Also: ClientTarget Members


public sealed class ClientTarget : System.Configuration.ConfigurationElement


The System.Web.Configuration.ClientTarget class refers to elements that are added in the clientTarget section of the configuration file.

The System.Web.Configuration.ClientTarget class belongs to a group that includes the System.Web.Configuration.ClientTargetCollection class and the System.Web.Configuration.ClientTargetSection class.

The System.Web.Configuration.ClientTarget class contains two properties identifying a client browser, also named user agent. One property is the alias associated with the client browser identified by the second property. ASP.NET uses this information to render server controls in a page.

For information about how the user agent or its alias is used programmatically, see the System.Web.UI.Page.ClientTarget property. For information about how the user agent or its alias is used declaratively, see @ Page.

If the System.Web.UI.Page.ClientTarget property is not set, the System.Web.HttpBrowserCapabilities object that is associated with the System.Web.UI.Page.Request property reflects the capabilities of the client browser. (It reflects the capabilities of the browser type, but not necessarily the settings in a specific instance of that browser.) If the property is set, the client browser detection is disabled and the page uses browser capabilities that are associated with the user agent string that you define. You can set this property to any valid user agent string.


Namespace: System.Web.Configuration
Assembly: System.Web (in System.Web.dll)
Assembly Versions:
Since: .NET 2.0