Both Scott and Bertrand has written nice articles on how to use custom HttpHandlers in order to return custom content from a HTTP request. The most common practise is to stream content directly to the client instead of pointing to a PDF or image URL, for example. It easily lets you act upon HTTP Requests without implmenting the full web page structure.
Even if the HttpHandler / ASHX architecture isn't very well documented, the two articles should give you a good head start.
Remember Me
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.