Is it possible to clear all page content from an xslt? I've tried to call Response.ClearContent(); from a C# script inside an xslt, but it doesn't work. What I'm trying to do is add a get parameter to the page that when true the page outputs xml, when false or not set outputs the html as usual. Is it possible to achieve this from xslt, do I have to make a user control or is there another way?
Clear page from xslt macro
Hi,
Is it possible to clear all page content from an xslt? I've tried to call Response.ClearContent(); from a C# script inside an xslt, but it doesn't work. What I'm trying to do is add a get parameter to the page that when true the page outputs xml, when false or not set outputs the html as usual. Is it possible to achieve this from xslt, do I have to make a user control or is there another way?
Maybe you could use alternative templates - one to render HTML and one to render XML?
See: http://www.nibble.be/?p=42 for more info.
I guess you already know about changing the MIME type to XML with Umbraco Utilities?
Edward, that's a very good idea, thank you!
is working on a reply...