hi guys, Can you help me. How can I delete the uploaded photo ?? if I click the delete button message box appear and asking if I am sure to delete the photo, if I choose the Ok button the image was still there. How can I remove that?? what are the right code for this. Thanks.

Recommended Answers

Give full access rights to your Image folder for deleting any image using code

Jump to Post

All 3 Replies

Give full access rights to your Image folder for deleting any image using code

why not store the images in a database, then delete the image in the database using a stored procedure.

@barriegrant1, It is not a good idea to store images into db.

@roXy101208, You need to reset ImageUrl path (Image1.ImageUrl=""). (Use methods from the System.IO.FileInfo, DirectoryInfo classes to manage files and folders)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.