Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Text;
- using System.Windows.Forms;
- using System.IO;
- using System.Net;
- namespace WindowsFormsApplication1
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- using (WebClient client = new WebClient()) {
- string s = client.DownloadString("http://www.google.com");
- this.textBox1.Text = s;
- }
- }
- }
- }
- Updated proxy settings
- Current WinHTTP proxy settings under:
- HKEY_LOCAL_MACHINE
- SOFTWAREMicrosoftWindowsCurrentVersionInternet SettingsConnections
- WinHttpSettings :
- Direct access (no proxy server).
- using (WebClient client = new WebClient()) {
- string s = client.DownloadString("http://www.google.com");
- // do something with s
- }
Add Comment
Please, Sign In to add comment