I have a dll project that has HttpHandler code that is referenced in my ASP.Net web project. Now, when a URL comes into my web app that is sent to my HttpHandler, I'm trying to return HTML that has references to resources (images, js, css, etc.) that are embeeded in my dll project. But everywhere I've looked people are describing how to do this WITHIN A USERCONTROL. But I don't have a user control. I just have my IHttpHandler that receives the HttpContext and I build my http response through HttpContext.Response.
This is a code sample from MSDN. It seems like the only way to use the GetWebResourceUrl() method is to have a reference to a ClientScriptManager, which in turn expects to have access to the Page reference. Can I get to this from my HttpContext, which is the only thing I have access to in my HttpHandler?
// Define the resource name and type.
String rsname = "script_include.js";
Type rstype = typeof(ClientScriptResourceLabel);
// Get a ClientScriptManager reference from the Page class.
ClientScriptManager cs = Page.ClientScript;
// Write out the web resource url.
ResourcePath.InnerHtml = cs.GetWebResourceUrl(rstype, rsname);Thanks
Mark