-2
當我使用的是DownloadStringAsync與Web客戶端的給我錯誤怎麼解決這個問題DownloadStringAsync返回錯誤,下載文件使用URL
private void BtnDownload_Click(object sender, RoutedEventArgs e)
{
//string PDFPath = ((((sender as Button).Content) as StackPanel).Children[1] as TextBlock).Text;
string PDFPath = "http://www.ncu.edu.tw/~ncu25352/Uploads/20131231103232738561744.pdf";
pdffile = PDFPath;
WebClient wb = new WebClient();
wb.DownloadStringCompleted += wb_DownloadStringCompleted;
wb.DownloadStringAsync(PDFPath,"pdfnamefile");
}
void wb_DownloadStringCompleted(object sender, System.Net.DownloadStringCompletedEventArgs e)
{
throw new NotImplementedException();
}
'它給我錯誤'非常有用的解釋.... –