
Context | 249
Page Class
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
Message.Text &= " - ActiveX Controls: " & _
Request.Browser.ActiveXControls & "<br/>"
Message.Text &= " - Frames: " & _
Request.Browser.Frames & "<br/>"
End Sub
Notes
The ClientTarget can also be specified by using the ClientTarget attribute of the @
Page
directive.
Changing the value of the ClientTarget property in the example to
ie4 will result
in output indicating that all of the listed features are supported.
While most server controls render HTML 3.2 for all browsers, the validation
controls are an example of controls that render differently, depending on the value
of ClientTarget. If the ClientTarget property is set to
downlevel, then validation is
performed on the server side, meaning that if we view the source, no client-side
script will perform the validation.
If the ClientTarget is set to uplevel, then the validation controls emit client-side
JavaScript to perform client-side validation.
Context
HttpContext = Page.Context
Returns an HttpContext instance containing context information for the current
HTTP request.
Parameter
HttpContext
A variable of type HttpContext that will receive the reference to the current
HttpContext instance.
Example
The following code example uses the Context property to return the name of the
currently logged in user. This information ...