网页下载文件

代码
System.Net.WebClient webClient = new System.Net.WebClient();
if (webClient.IsBusy == true)//是否存在正在进行中的Web请求
{
    webClient.CancelAsync();
}

m_strPath 
= DesktopHelp.CDesktopHelp.ExeAbsoluteFile("..\\Bin\\TileCapabilities.xml");
string strURL = m_URL + "/GetCapabilities";
 webClient.DownloadFile(
new Uri(@strURL), m_strPath);
原文地址:https://www.cnblogs.com/Y1Focus/p/1749976.html