views:

11

answers:

0

I'm working on customizing BlogEngine.Net to be able to return some HTML from an AJAX call. Basically I'd like to render a UserControl server-side and then return the resulting HTML to a client-side call.

I've done this many times in other applications using static PageMethods marked with the [WebMethod] attribute. But any time I try this with BlogEngine.Net, I get the full HTML of the page returned. It doesn't even look like the WebMethod is getting touched.

I've also tried to implement this as an HttpHandler, but I have the same result. As soon as I include a page (vanilla Page class) and use it to render the control, I get the full HTML of the page I am calling from instead of the generated code, leading me to assuming something is hijacking my code to render a Page.

Any ideas or alternate solutions to be able to render a user control server-side and return the HTML using the BlogEngine.Net framework?