Name

<filter>

Synopsis

<filter match=string>
    property1=value
    property2=value
    propertyN=value
</filter>
<filter match=string>
    <filter match=string with=expressionToSearch>
        property1=value
        property2=value
        propertyN=value
   </filter>
</filter>
<filter>
   <case match=string>
        property1=value
        property2=value
        propertyN=value
   </case>
   <case match=string>
        property1=value
        property2=value
        propertyN=value
   </case>
</filter>

Specifies a regular expression pattern to search for in the server variable given in the <use> element (or optionally, another expression). Multiple <filter> elements can be contained in the <browserCaps> element; likewise, each <filter> element can contain <case> elements or other <filter> elements. All property assignments for matching <filter> elements will be executed, regardless of their order.

Scope

Any

Attributes

match

The pattern to match. Uses .NET Framework regular expression syntax. This attribute is optional. If omitted, all requests will be assumed to match and any property/value assignments contained within the <filter> element will be executed.

with

The regular expression or string to search for. This attribute is optional. If omitted, the server variable specified in the <use> element will be searched.

Child Elements

<case>

Notes

The fact that <filter> elements can be nested makes them very flexible in terms of locating subsets of information. For example, the default <browserCaps> element in machine.config uses nested <filter> elements to locate both the major and ...

Get ASP.NET in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.