> I had a similar requirement, and the immediate simple solution was to
do
> just what you did--pass a reference to a current application ( get
access
> to Request.Form and QueryString data).
>
> Looking back on the old COM solutions, where you got a ref to
> ObjectContext
> and on to ASP objects, this seems cleaner.

As some alluded to earlier in this thread, the current context (and thus
the current request, response, application, session, etc.) is always
available through the static 'Current' property of the HttpContext
class:

HttpContext.Current.Response.Write("hi");

Thus you can write helper classes that simply assume they will be
running in the context of an ASP.NET web application, and have them
interact with all the elements of the HttpPipeline through the context
class. No paramters needed.

        -Fritz

Fritz Onion
DevelopMentor
http://staff.develop.com/onion/

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to