I am writing an app in c#, Is there a way to download a HTML page by giving my program its URL only. Foe example my program will get the URL www.google.com and download the HTML page?
How to Download a Webpage in Google Chrome. 1 Press the ‘Save page as…’ button. 2 Save the HTML file as a complete page, single file, or HTML only. 3 Open the saved Chrome webpage in your browser. 4 Access your saved web page in your downloads folder.
If you’re looking to do some offline viewing, you can save a web page in Chrome as a HTML file. When you save from Chrome using this method, you can choose to keep just the basic text to keep the file size low or download additional assets like pictures. The advantage of this method over saving a webpage as a pdf is the underlying code.
To find out, open up the project properties window, and go to the Configuration Properties -> General window. Notice what the “Character Set” field is set to. “Not Set” corresponds to using the ASCII character set. To download the web page, simply use the URLDownloadToFile function.
– Webpage, Complete: Saves a HTML file as well as a separate folder that requires all of the files the website needs to function. Typically has the closest results to the original page.
Use WebClient.DownloadString().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With