We are downloading a full web page using System.Net.WebClient class. But we only want less than half of the page. So is there a way to download a portion of the page, say 1/3rd, half etc of a page using .net library so that We can save the network bandwidth and the space? If so, please throw your ideas, thanks.
We are downloading a full web page using System.Net.WebClient class. But we only want
Share
You need to provide an “Accept-Ranges header” to your GET or POST request. That can be done by using the AddRange method of your HttpWebRequest:
That would yield the first 100 bytes. The server, however, needs to support this.