TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ajay raju
NA
398
0
delete datagrid images in saved directory
Mar 2 2010 7:39 AM
hi!
i am using datagrid to display images.(i write code using delete command). i delete a row in datagrid that row is deleted. but my problem is image is also deleted in saved directory.
my code like:
String imagePath = "~/ContentImages/Products/" + Image;
System.IO.FileInfo file1 = new System.IO.FileInfo(Server.MapPath(imagePath));
file1.Delete();
i using this code it display one error message in run time. i.e., Access to the path is denied.
if i give image name then it deleted. but i am not giving any name it takes path of datagrid image url.
urgent. please help me. give a sample code.
Thanks.
Reply
Answers (
1
)
Security exception when constructing system.net.mail.smtpClient. Need smtpPermission?
increase textbox height based on text