How to get a rendered page?

Posted by Community Admin on 04-Aug-2018 11:15

How to get a rendered page?

All Replies

Posted by Community Admin on 18-Nov-2011 00:00

Hello there,

I'm trying to get the rendered html of a page, I've tried the InMemoryPageRender but the problem with that is that it isn't able to show dynamic data. Is there a way to get a full rendered html of a page? 

( I'm trying to use jQuery.Load() with sitefinity and I need the html of a page )

Posted by Community Admin on 23-Nov-2011 00:00

Hi Khai,

Please take a look at this KB article:

http://www.sitefinity.com/devnet/kb/sitefinity-4-x/globally-overwriting-properties-for-frontend-pages.aspx

It outlines how you can override the page route handler. You can get an instance of the rendered Page at some late stage - for example in the

public override void ProcessRequiredControls(Page page, PageSiteNode data)


method, or in the

protected override IHttpHandler BuildHttpHandler(RequestContext requestContext)

get a reference to the page like this

var handler = (Page)BuildManager.CreateInstanceFromVirtualPath(virtualPath, typeof(Page));

and subscribe to its PreRenderComplete event like this

handler.PreRenderComplete += new EventHandler(handler_PreRenderComplete);

and there you can cast the sender to Page and could use the InMemoryPageRender to get the page rendered.

All the best,
Lubomir Velkov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed