Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
how to prevents image not delete if image url exist another
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Devendra Kumar
8y
266
1
Reply
if delete but image url use another row in grid view
how to check condition if image url count >1 than image not delete
GridViewRow row = (GridViewRow)((ImageButton)e.CommandSource).Parent.Parent;
int ImgId = (int)GridImageMaster.DataKeys[row.RowIndex].Value;
fileupload1.Value = ((Label)row.FindControl("lblImage")).Text;
FileInfo OldImage = new FileInfo(Request.PhysicalApplicationPath + "ProductImages/" + fileupload1.Value);
if (OldImage.Exists)
{
OldImage.Delete();
}
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Current day + Expiry Day in asp.net insert to Datatable
how to make airline reservation in asp.net?