
436
|
Chapter 20: web.config Reference
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
Attribute
type
The class name, and optionally, version, culture, and key information that
specifies the class that will contain the results of the browser capabilities anal-
ysis. This class must derive from HttpCapabilitiesBase. The default (set in
machine.config) is System.Web.HttpBrowserCapabilities.
Child Elements
None
Notes
The default type of System.Web.HttpBrowserCapabilities is fine in most cases. If
you want to add additional properties beyond those defined by the
HttpBrowserCapabilities class, you can create your own class (derived from
HttpCapabilitiesBase or HttpBrowserCapabilities) and use the <result> element
to substitute it.
<use>
<use var=serverVariableName as=aliasName />
Sets the name of the server variable to use when evaluating browser capabilities.
Scope
Any
Attributes
var
The name of the server variable to use. The default is
HTTP_USER_AGENT.
as
The string containing a name by which the server variable can be referenced
in
<case> elements and regular expressions.
Child Elements
None
Notes
The <use> element is followed by property/value pairs that specify the default
properties for the browser capabilities component if no match is found with a
<filter> element’s match attribute (or that of its child <case> element). This usage
is demonstrated ...