
248
|
Chapter 12: The Page Class
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
ClientTarget
String = Page.ClientTarget
Gets or sets a string value that allows you to override automatic browser detec-
tion in ASP.NET, force the page to be rendered for a browser type configured in
machine.config or web.config, and specified by this property. The available precon-
figured values for this property are as follows:
downlevel
The page will be rendered based on the browser capabilities defined for
unknown browsers in the
<browserCaps> element of machine.config.
ie4
The page will be rendered based on the values for Internet Explorer 4.0
configured in the
<browserCaps> element of machine.config.
ie5
The page will be rendered based on the values for Internet Explorer 5.0
configured in the
<browserCaps> element of machine.config.
Parameter
String
A string that specifies the alias for the browser capabilities that the page will
target.
Example
The following code example initializes the ClientTarget property of the Page class
to
downlevel, indicating that ASP.NET must render the page for an unknown
browser type, which will result in HTML 3.2–compliant output. The example
then displays a message indicating whether a set of features is supported. In the
case of
downlevel, none of the listed features is supported.
Sub Page_Load( )
Page.ClientTarget = "downlevel" ...