3
4
5
6
7
8
9 WebClient client;
10 // Constructor public MainPage() { InitializeComponent(); client = new WebClient(); client.DownloadStringCompleted += new DownloadStringCompletedEventHandler( client_DownloadStringCompleted); }
11 // Constructor public MainPage() { InitializeComponent(); client = new WebClient(); client.DownloadStringCompleted += new DownloadStringCompletedEventHandler( client_DownloadStringCompleted); }
12 void client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) { if (e.Error == null) { pageTextBlock.Text = e.Result; }
13 private void loadButton_Click(object sender, RoutedEventArgs e) { client.DownloadStringAsync(new Uri(urlTextBox.Text)); }
14 private void loadButton_Click(object sender, RoutedEventArgs e) { client.DownloadStringAsync(new Uri(urlTextBox.Text)); }
15
16