這個問題的標題應該是不言自明,但基本上我有這樣的代碼(工作)上傳通過HTTP文件和讀取結果在C#
progfrm = new progressform();
System.Net.WebClient ahwebclient = new System.Net.WebClient();
progfrm.Show();
ahwebclient.UploadProgressChanged += new System.Net.UploadProgressChangedEventHandler(ahwebclient_UploadProgressChanged);
ahwebclient.UploadFileCompleted += new System.Net.UploadFileCompletedEventHandler(ahwebclient_UploadFileCompleted);
ahwebclient.UploadFileAsync(new Uri("http://upload.anyhub.net/bin/demovu_upload.php"), "C:/install.exe");
while (ahwebclient.IsBusy)
{
Application.DoEvents();
}
我將如何讀這個請求的這個結果一旦它完成了嗎?
什麼是你`ahwebclient_UploadFileCompleted`事件處理方法? – 2009-04-19 23:48:36
void ahwebclient_UploadFileCompleted(object sender,System.Net.UploadFileCompletedEventArgs e) progfrm.Close(); progfrm.Dispose(); } – 2009-04-19 23:49:39