I want to make a site which would work with some data from another site. The following code allows me to get the whole DOM from the target.
public IActionResult About(){
string s = new System.Net.WebClient().DownloadString("https://siteToRead.com");
ViewData["pageinfo"] = s;
return View();
}
The problem is that it does not wait until the page is fully loaded (which in my case takes about a second) and therefore there is information that is simply not there yet. In this case it is replaced with "Loading data from server."
Is there a way to give the webClient some time to let the page content load completely?