This documentation is archived and is not being maintained.


Specifies the configuration section for filtering within the <system.web> section of the Web.config file.

      <filter name="capability"
         argument="argument" />
      <filter name="capability"
         method="methodName" />
      <!-- Additional filters here. -->

You can select from two types of device filters, comparison evaluators or evaluator delegates.

For simple comparisons, you can specify a comparison-based filter by providing the name of a capability and a value to compare against. At run time, the device filter evaluates to true if the capability value and the supplied value are equal. Boolean properties are compared as case insensitive, thus true and True are equivalent. Other properties are compared as case sensitive.

For more complex evaluation, you can specify an evaluator delegate-based filter, by providing the class and method name of a method. At run time, the supplied method is called to determine whether the device filter evaluates to true.

The <filter> element has the attributes shown in the following table.




Specifies the unique name for the device filter.


A filter with the same name as an earlier defined filter (either later in the configuration file or later in the configuration file hierarchy) will override the filter that was previously defined.


Specifies the capability evaluated by the comparison evaluator. The capability can be any built-in capability or the name of any other custom capability evaluator.


Specifies the argument against which the capability will be compared.


Specifies the class type that supplies the evaluator delegate. The name must be fully qualified. ASP.NET will search the specified assembly for the type.


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

static bool EvaluatorMethod(System.Web.Mobile.MobileCapabilities capabilities,
   String compareArgument)