How to Download a Web Page in WinForms

January 18, 2009 | By

Sometimes a desktop application might need to download a web page to be displayed to the user or screen scrapped. I did this in my MoviePlay application to get the IMDb (The Internet Movie Database) page of the movie. To accomplish this include first the System.IO and System.Net namespaces:

The following code needs 3 controls to work; a TextBox (textBox1), a Button (button1), and a WebBrowser (webBrowser1).

Filed in: WinForms | Tags:

Comments are closed.