Skip to content

Instantly share code, notes, and snippets.

@vman
Created April 27, 2011 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vman/944823 to your computer and use it in GitHub Desktop.
Save vman/944823 to your computer and use it in GitHub Desktop.
Get HTML from page in SharePoint Client Obeject Model
ClientContext clientcontext = new ClientContext(sitecollection);
clientcontext.Credentials = Credentials;
var page = Microsoft.SharePoint.Client.File.OpenBinaryDirect(clientcontext, "/Sites/Vard/SitePages/Home.aspx");
StreamReader reader = new StreamReader(page.Stream);
string pageHTML = reader.ReadToEnd();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment