TemplateControl.IFilterResolutionService.CompareFilters(String, String) 方法

定義

傳回值,指出兩個指定的裝置篩選條件之間是否存在父子式關聯性。Returns a value that indicates whether a parent/child relationship exists between two specified device filters.

 virtual int System.Web.UI.IFilterResolutionService.CompareFilters(System::String ^ filter1, System::String ^ filter2) = System::Web::UI::IFilterResolutionService::CompareFilters;
int IFilterResolutionService.CompareFilters (string filter1, string filter2);
Function CompareFilters (filter1 As String, filter2 As String) As Integer Implements IFilterResolutionService.CompareFilters

參數

filter1
String

裝置篩選條件名稱。A device filter name.

filter2
String

裝置篩選條件名稱。A device filter name.

傳回

如果 filter1filter2 的父代,則為 1;如果 filter2filter1 的父代,則為 -1;否則,如果 filter1filter2 之間沒有任何父子式關聯性,則為 0。1, if filter1 is a parent of filter2; -1, if filter2 is a parent of filter1; otherwise, 0, if there is no parent/child relationship between filter1 and filter2.

實作

備註

IFilterResolutionService.CompareFilters 方法是 IFilterResolutionService 介面的一部分,這是控制項在設計工具環境中使用裝置篩選器的特定方式。The IFilterResolutionService.CompareFilters method is part of the IFilterResolutionService interface, which is specific to how a control uses device filters in a designer environment. 當控制項在瀏覽器要求內容外剖析或保存在設計工具環境中時,IFilterResolutionService 會提供一種方法來判斷目前的控制項是否受到命名篩選的影響,以及指定的篩選是否為特定裝置篩選準則的一部分。階層.When controls are parsed or persisted in the designer environment outside the context of a browser request, the IFilterResolutionService provides a way to determine if the current control is affected by a named filter and whether a named filter is part of a specific device-filter hierarchy.

適用於

另請參閱