Chapter 27: Modules And Handlers - Listing 27.2
The listed code for 'Modifying HTTP Ouput' does not work for me.
Whereas if I change,
context.PreSendRequestContent += new EventHandler(context_PreSendRequestContent);
to
context.PostRequestHandlerExecute += new EventHandler(context_PostRequestHandlerExecute);
and
_current.Response.Output.Write(message);
to
HttpContext.Current.Response.Output.Write(message);
everythings fine!
(_current throws an 'object reference not set...' exception on the second run)
Did I do anything wrong?
Last edited by Nikhil; February 4th, 2010 at 07:27 AM..
|