Share via


ModuleListPage.ClearFilter Method

Definition

Clears the filter.

protected:
 void ClearFilter();
protected void ClearFilter ();
member this.ClearFilter : unit -> unit
Protected Sub ClearFilter ()

Examples

The following example clears the filter.

internal class DemoPage : ModuleListPage {

    public DemoPage() : base() { }
    ModuleListPageGrouping _entryTypeGrouping;

protected override ModuleListPageFilter Filter {
    get {
  //      return null;
        if (_filter == null)
            _filter = new ModuleListPageFilter(
                "My Filter", true);

        return _filter;
    }
}
protected override void OnClearFilter() {
    _filter = null;

    Refresh();
    RefreshSearchPanel();
} 

Remarks

This method is called when the user clicks the Remove filter link in IIS Manager. This link appears, for example, when a list of applications is filtered by application pool.

When you add a Microsoft.Web.Management.Client.ModuleListPageFilter object by overriding the Filter property, you must also override the OnClearFilter method and clear the Microsoft.Web.Management.Client.ModuleListPageFilter object.

Applies to