Here is the code I used to just get the HTML for an XSLT macro in
Umbraco. Setup a RestExtension to return this content. The code is not
refined and hard coded. I stole this from the xsltVisualize.aspx.cs
publicstaticstringGetMacroContent() { HttpRequest post =HttpContext.Current.Request; Member umbMember =Member.GetCurrentMember(); string macroname = post["macroname"]; string content =string.Empty;
Retrieving HTML generated using XSLT through AJAX
I am new to Umbraco, just want to get input on if the following is the way to go to retrieve HTML generated using XSLT through AJAX.
1. Create the XSLT Macro that generates the HTML
2. Place the XSLT Macro in blank page
3. Call page with AJAX
Is there a better way to do this? Can we run the XSLT macro programmatically in .NET code and return string using BASE?
Here is the code I used to just get the HTML for an XSLT macro in Umbraco. Setup a RestExtension to return this content. The code is not refined and hard coded. I stole this from the xsltVisualize.aspx.cs
is working on a reply...