Partager via


How to: Configure Device Filters

ASP.NET mobile controls enable you to edit and configure existing device filters according to your needs. It is recommended that you do not alter the settings of the filters provided with the ASP.NET mobile controls. Instead, define new custom filters that are appropriate to your requirements.

Only the current device filter can be edited, so you must select a device filter before you configure it.

To configure a device filter

  1. Select the control to which the filter will be applied.

  2. In the Properties window, click the ellipsis button (ASP.NET Mobile Designer ellipse) in the AppliedDeviceFilters box.

    The Applied Device Filters dialog box appears.

  3. In the Available Device Filters list, click the filter to edit, and then click Edit.

    The Device Filter Editor dialog box appears.

  4. Edit the name of the filter type by selecting the Type attribute. For more information about the Type attribute, see Device-Specific Rendering.

  5. Fill in the appropriate attribute fields. For equality-comparison device filters, enter values for the Compare and Argument attributes. For evaluator-delegate filters, enter values for the Type and Method attributes.

  6. Use the up arrow and down arrow buttons to change the order in which the device filters are saved in the Web.config file.

    Notes

    Because Visual Studio saves filter changes in the Web.config file, these changes affect the definition for every page in your project. Changing the order does not change the behavior at run time.

  7. Click OK.

See Also

Concepts

Introduction to Device Filters

Defining Device Filters

Applying Device Filters

Overriding Properties

Other Resources

Customizing ASP.NET Mobile Web Controls for Specific Devices

Customizing with Control Templates