protected void Page_Load(object sender, EventArgs e)
{
string sRmFile = " http://zi.csdn.net/1000huawei.gif";
string sSavePath = @"c:/1000huawei.gif";
System.Net.WebClient wc = new System.Net.WebClient();
try
{
wc.DownloadFile(sRmFile, sSavePath);
Response.Write("远程文件已经下载完毕!");
}
catch (System.Exception ex)
{
Response.Write("error:" + ex.Message.ToString());
}
img.ImageUrl = sSavePath.ToString();
}
{
string sRmFile = " http://zi.csdn.net/1000huawei.gif";
string sSavePath = @"c:/1000huawei.gif";
System.Net.WebClient wc = new System.Net.WebClient();
try
{
wc.DownloadFile(sRmFile, sSavePath);
Response.Write("远程文件已经下载完毕!");
}
catch (System.Exception ex)
{
Response.Write("error:" + ex.Message.ToString());
}
img.ImageUrl = sSavePath.ToString();
}