次の方法で共有


<device> 

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

<system.web>
  <mobileControls allowCustomAttributes="true|false"
    sessionStateHistorySize="historySize" >
    <device name="name"
      inheritsFrom="parentAdapterSet"
      predicateClass="predicateClass"
      predicateMethod="predicateMethod"
      pageAdapter="pageAdapterClass" >
      <control name="controlClass" adapter="adapterClass" />
        ... Additional controls.
    </device>
  </mobileControls>
</system.web>

Remarks

For more information about how to create and configure adapters, see Adding New Device Adapters and Device Support.

The attributes for the <device> element in the <mobileControls> section are shown in the following table.

Attributes of the <device> element Description

Name

Specifies the unique name you can use to identify the device adapter set.

inheritsFrom

Specifies an optional reference to another device adapter set from which this set inherits. The specified device adapter set can appear earlier in the same <mobileControls> section, or it can appear in the <mobileControls> section of a configuration file higher in the configuration hierarchy.

predicateClass

Specifies the class type that supplies the evaluator predicate. The name that you use for the class type must be fully qualified.

ASP.NET searches the specified assembly for the type. If the adapter set inherits from another type, the predicateClass attribute is not necessary and will default to the parent set's value.

predicateMethod

Specifies the method that supplies the evaluator predicate. The method must be static and have the following signature:

static bool EvaluatorMethod(
    HttpContext context)

If the adapter set inherits from another adapter set, the predicateMethod attribute is not necessary, and will default to the parent set's value.

pageAdapter

Specifies the class type of the page adapter for the adapter set. The specified class must implement the IPageAdapter interface. The name must be fully qualified.

ASP.NET searches the specified assembly for the type. If the adapter set inherits from another adapter set, the pageAdapter attribute is not necessary, and will default to the parent set's value.

See Also

Concepts

Mobile Controls Reference

Other Resources

Configuration Files in the Mobile Controls