On some pages I would like to be able to (in OnLoad) to get the parsed HTML from a XhtmlString-property defined on the page and replace some of the text (acutally adding popups with descriptions for specific words) before displaying it.
If the Xhtml-string property contains neither DynamicContent or Blocks, this works fine. However, both blocks and DynamicContent makes this difficult.
I have read this blogpost from Ted Nyberg, but it don't help me with blocks.
Hi! Take a look at this blog post and the ToBlocksIncludedString method. It might contain what you are looking for
Thanks! But I'm not quite sure how to get the rendered HTML for the individual blocks on line 17 in your ToBlocksIncludedString()?
The markup for the blocks are defined in separate usercontrols (still stuck on webforms). How can I get the rendered html without duplicating all the markup in the extension method?