2
private void button7_Click(object sender, RoutedEventArgs e)
{
WebClient client = new WebClient();
client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);
client.DownloadStringAsync(new Uri("http://asd.com/bb"));
}
void client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
if (e.Error == null)
{
MessageBox.Show(e.Result);
}
else {
MessageBox.Show("err: " + e.Error.ToString());
}
}
我该如何从DownloadStringCompleted获取url?或者我如何将一些参数传递给我的DownloadStringCompleted?Windows Phone 7 DownloadStringCompleted和什么是网址?还是params?
请帮助