I used the following code to get the SourceCode from a SharePoint 2010 site:
try {
WebRequest req = HttpWebRequest.Create("myLink");
req.Method = "GET";
req.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
string source = "";
using (StreamReader reader = new StreamReader(req.GetResponse().GetResponseStream())) {
source += reader.ReadToEnd();
}
}
From the source string i was able to search for keywords i was looking for on the website.
Now the SharePoint has been migrated to 2016 and i am not able anymore to view the specific content in the Source Code.
However it is posible to use for example the integrated web developer tool of chrome to view the structure of the site. Also my content i am looking for is visible in this case.
How is it possible to get this information programmatically using C#?
Try this: