Share via


result Element for browserCaps (ASP.NET Settings Schema)

Specifies the HttpCapabilitiesBase-derived class that is used to hold the results from parsing the browserCaps section. The capabilities are stored as key/value string pairs for each browser.

<result 
   type="section type"
/>

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute Description

type

Required String attribute.

Specifies the name of the class that parses the section and stores the key/value pairs that describe browser capabilities.

The default in the .NET Framework version 2.0 is "T:System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".

Child Elements

None.

Parent Elements

Element Description

configuration

Specifies the required root element in every configuration file that is used by the common language runtime and the .NET Framework applications.

system.web

Specifies the root element for the ASP.NET configuration settings in a configuration file and contains configuration elements that configure ASP.NET Web applications and control how the applications behave.

browserCaps

Specifies the settings of supported browsers and the capabilities for the browsers. This element can be updated as required to specify new browsers and capabilities.

For a list of valid browser properties, see HttpBrowserCapabilities.

Remarks

The result element specifies the class that is derived from the HttpCapabilitiesBase class that is used to hold the results from parsing the browserCaps section. The capabilities are stored as key/value string pairs for each browser.

At run time, one instance of the HttpCapabilitiesBase-derived class is created per application and stored in the Browsers property.

Default Configuration

In the .NET Framework version 2.0, the following default result element is configured in the root Web.config file.

<result 
   type="System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 
/>

In the .NET Framework version 1.1, the following default result element is configured in the Machine.config file. Updates to the browser data are provided by companies such as cyScape, Inc. and available through their Web sites. Periodic device updates replace this browser capabilities section.

<result 
   type="System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
/>

In the .NET Framework version 1.0, the following default result element is configured in the Machine.config file. Updates to the browser data are provided by companies such as cyScape, Inc. and available through their Web sites. Periodic device updates replace this browser capabilities section.

<result 
   type="System.Web.HttpBrowserCapabilities" 
/>

Example

The following code example demonstrates how to specify the type that parses the browserCaps section.

   <result type="System.Web.HttpBrowserCapabilities, System.Web,  
           Version=1.0.3102.0, Culture=neutral,
           PublicKeyToken=b03f5f7f11d50a3a"/>

Element Information

Configuration section handler

HttpCapabilitiesSectionHandler

Configuration member

Browsers

Configurable locations

Machine.config

Root-level Web.config

Application-level Web.config

Virtual or physical directory–level Web.config

Requirements

Microsoft Internet Information Services (IIS) version 5.0, 5.1, or 6.0

The .NET Framework version 2.0 (deprecated), 1.1, or 1.0

Microsoft Visual Studio 2003 or Visual Studio 2005

See Also

Tasks

How to: Detect Browser Types in ASP.NET Web Pages
How to: Configure Specific Directories Using Location Settings
How to: Lock ASP.NET Configuration Settings

Reference

browserCaps Element (ASP.NET Settings Schema)
system.web Element (ASP.NET Settings Schema)
configuration Element (General Settings Schema)
filter Element for browserCaps (ASP.NET Settings Schema)
use Element for browserCaps (ASP.NET Settings Schema)
Browser Definition File Schema (browsers Element)
System.Configuration
System.Web.Configuration
HttpCapabilitiesSectionHandler
Browsers

Concepts

ASP.NET Web Server Controls and Browser Capabilities
ASP.NET Configuration File Hierarchy and Inheritance
Securing ASP.NET Configuration
ASP.NET Configuration Scenarios

Other Resources

General Configuration Settings (ASP.NET)
ASP.NET Configuration Settings
Configuring ASP.NET Applications
ASP.NET Configuration API