1
Answer

Image Download is taking lot of time while using Web Client

Hi,
 
Am downloading an image from hosting server to local server using Web Client.But it is taking lot of time to download the image.Below is my download functionality code.
 
 
protected void btnInvDownload_Click(object sender, EventArgs e)
{
if (lstImgPath.Items.Count != 0)
{
string filepath = lstImgPath.SelectedItem.Text;
Response.AddHeader("Content-Disposition", "attachment;filename=\"" + filepath + "\"");
WebClient client = new WebClient();
client.DownloadFile("http://numbersonly.co.in:9191/HSC_Mobile_Test/images/" + filepath + ".jpg", Server.MapPath("~/images/Eqp/" + filepath));
client.Proxy = null;
Response.End();
}
}
 
Thanks,
Karthik S 
 
 
 
Answers (1)