
Response | 297
HttpContext
Class
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
IsDebuggingEnabled
Boolean = Context.IsDebuggingEnabled
Returns a Boolean value specifying whether debugging is enabled for the current
request.
Parameter
Boolean
A Boolean variable to receive value of this flag.
Example
The example displays True if debugging is enabled; otherwise, it displays False:
Sub Page_Load( )
Message.Text = "Debugging Enabled?" & _
Context.IsDebuggingEnabled
End Sub
Notes
This flag is controlled by the compilation section in web.config. If the compilation
section’s debug attribute is set to True, IsDebuggingEnabled returns True. If the
debug attribute in the compilation section is set to False, this property is False.
Request
HttpRequest = Context.Request
Returns the HttpRequest object for the current request.
Parameter
HttpRequest
An HttpRequest variable to receive the current HttpRequest object.
Notes
This property is provided for applications other than ASP.NET pages (where the
Page.Request property is normally used to retrieve the HttpRequest object). Code
that does not have access to the properties of the
Page class includes HttpHan-
dlers and HttpModules, as well as event handlers in global.asax.
Response
HttpResponse = Context.Response
Returns the HttpResponse object for the current request.
Parameter
HttpResponse
An HttpResponse variable ...