DeviceElement Class [IIS 7 and higher]

Defines an adapter set that maps ASP.NET mobile controls to corresponding adapters within the <system.web> and <mobileControls> sections of the Web.config configuration file.

Syntax

class DeviceElement : CollectionElement

Methods

This class contains no methods.

Properties

The following table lists the properties exposed by the DeviceElement class.

Name

Description

Device

An array of read/write AdapterElement values, each of which maps an ASP.NET mobile control to a specific device adapter.

InheritsFrom

An optional read/write string value that specifies the device adapter set from which this set must inherit. The specified device adapter set can appear either earlier in the same <mobileControls> section or in the <mobileControls> section of a higher-level configuration file.

Name

A required read-only string value that specifies the unique name by which you must identify the device adapter set. The key property.

PageAdapter

An optional read/write string value that specifies the class type of the page adapter for the adapter set. The specified class must implement the IPageAdapter interface. The name must follow the .NET Framework standards for specifying a fully qualified type name.

ASP.NET searches the specified assembly for the type. If the adapter set inherits from another adapter set, the PageAdapter property is not necessary and its default value will be set to the value of the parent set.

PredicateClass

An optional read/write string value that specifies the class type that supplies the evaluator predicate. The name that you use for the class type must follow the .NET Framework standards for specifying a fully qualified type name.

ASP.NET searches the specified assembly for the type. If the adapter set inherits from another type, the PredicateClass property is not necessary and its default value will be set to the value of the parent set.

PredicateMethod

An optional read/write string value that specifies the method that supplies the evaluator predicate. The method must be static and of the following signature:

static bool EvaluatorMethod(HttpContext context)

If the adapter set inherits from another adapter set, the PredicateMethod property is not necessary and its default value will be set to the value of the parent set.

Subclasses

This class contains no subclasses.

Remarks

Instances of this class are contained in the MobileControls property of the MobileControlsSection class.

If an instance of this class specifies the InheritsFrom property, you do not need to specify the PredicateClass, PredicateMethod, or PageAdapter properties. Instead, your device adapter set can inherit these from the parent device-adapter set definition.

Inheritance Hierarchy

CollectionElement

   DeviceElement

Requirements

Type

Description

Client

Requires IIS 7 on Windows Vista.

Server

Requires IIS 7 on Windows Server 2008.

Product

IIS 7

MOF file

WebAdministration.mof

See Also

Reference

AdapterElement Class [IIS 7 and higher]

CollectionElement Class [IIS 7 and higher]

MobileControlsSection Class [IIS 7 and higher]

Other Resources

ASP.NET Mobile Web Applications Adapter Mappings

device Element for mobileControls (ASP.NET Settings Schema)

System.Web.UI.MobileControls.IPageAdapter Interface

system.web Element (ASP.NET Settings Schema)