hi Ricardo,
Just try this:
- Create a folder in your application which will store the image.
// Here there can be two cases: 1) you are saving the image in the folder. 2) your are saving the image in a database in binary format.
if you are saving the image in the folder, and if you are saving the path of the same in the database then I hope you shouldn't have any problem.
In your case I would suggest you to try to create a folder in your application and then try to upload image in that folder.
String path = Server.MapPath("~/UploadedImages/");
String fileExtension = System.IO.Path.GetExtension(fupldPhoto.FileName).ToLower();
imgEmpPhoto.ImageUrl =
"~/UploadedImages/" + txtEmpCd.Text.Trim() + "_Image" + fileExtension;
In this code UploadedImages is the folder I have created in the application. fupldPhoto is the user control name to upload file. imageEmpPhoto is the Image User control name. txtEmpCd is the employee code whose images is being uploaded.
Regards,
Royal
Enter your message below
Sign in or Join us (it's free).