Tuesday, May 22, 2012

How to save Image From ImageControl without FileUpload Contol..

First Get the Url of Image and then using webclient you can save file in folder.



string filepath = img1.ImageUrl;           
using (WebClient client = new WebClient())
{
 client.DownloadFile(filepath,Server.MapPath("~/Image/apple.jpg"));
}
This will save image in Image Folder with ImageName apple...

1 comments:

Unknown said...

Could not find a part of the path 'C:\Program Files\IIS Express\~\images\Student\a.jpg


This Error Arise when try to save image

Post a Comment