Try our conversational search powered by Generative AI!

Programatically access the full HTML for an EPiServer page?

Vote:
 

I am using EPiServer 4.x and want to run some diagnostic code on multiple pages of my site, but I need to check values within the final rendered pages' HTML code (eg: check Javascript includes are present, along with certain meta-tag values etc).

Can anybody please tell me how I can get EPiServer to output the final HTML for a page as a string?  Some of the pages will be behind secured areas of our site, so I will need to get them using the DataFactory to override the security.

One final complcation, the URL parameters are important, so I need to get the HTML for pages such as http://myepiserversite/folder1/mypage/?parameter=foo

Any ideas appreciated,

/\dam

#19734
Apr 30, 2008 14:44
Vote:
 

Is this something you want to do on a "live" site at runtime for every pageview or a diagnostic check to verify something on your development environment?

If you want to read the HTML output i'd say it's easier to request the pages from the webserver with a HTTP-get than trying to parse it from inside the page request.

#19753
May 02, 2008 2:14
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.