You're sure right Gregory. Using HttpContext tights the code to the ASP.NET
layer (we need to be in the HTTP Context in order to use the HttpContext
.
I understand that David's question referred to a class within the App_Code
folder (David said: "a class module") which is a part of the web
application.
If the "class module" means a class defined in an external assembly
referenced by David's ASP.NET application it also would have access to the
HttpContext. It is common to develop a set of WebControls as an additional
assembly. These controls would have access to the application's HttpContext.
The caveat of using HttpContext is pointed by Gregory:
"you cannot easily refactor the application to any other type of UI"
than ASP.NET
Cheers,
Leszek