c# - Webclient.DownloadString does not retrieve the whole page -


i'm trying retrieve source of site webclient.downloadstring, when debug string i'm writing source seems cut off part of html source.

text visualiser in vs: https://i.imgur.com/awittqi.png

browser debug: enter image description here

code:

public string getwebpagesource() {     using (webclient client = new webclient())     {         client.headers[httprequestheader.useragent] = "mozilla / 5.0(windows nt 10.0; win64; x64; rv: 44.0) gecko / 20100101 firefox / 44.0";         client.encoding = encoding.utf8;         string htmlcode = client.downloadstring("http://2007.runescape.wikia.com/wiki/bandos%20page%201");         return htmlcode;     } } 

so i'm wondering why that? if there's additional info needed, post it. reading!

thanks people i've found 'problem'. text visualiser in vs gave me indication text cut off, not problem when writing source file. thought did not download whole page because text in text visualiser. lession i've learned do not trust text visualiser!

by further debugging text file solve problems :)


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -