Wednesday 27 April 2011

Get HTML from page using the Client Object Model in SharePoint

Here is how to get the RAW HTML of a Web Page on your SharePoint Site using the Client Object Model:

Just substitute your Site Collection name instead of "sitecollection" and your page path along with the Relative Server URL instead of /Sites/Vard/SitePages/Home.aspx

The string variable pageHTML will now have the raw html of the Home.aspx page.

Have Fun!

No comments: