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
Ankita Singh
NA
159
18.9k
delete image from folder as like database
Mar 9 2018 5:07 AM
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string id = Request.QueryString["id"].ToString();
string photo = Request.QueryString["image1"].ToString();
imgdltdata(id,photo);
}
}
private void imgdltdata(string id, string photo)
{
string qry = "delete from appformtbl where id=" + id + " photo=" + photo + "";
{
string filePath = Server.MapPath("~/Rimage/" + "image1.FileName");
if (System.IO.File.Exists(filePath))
{
System.IO.File.Delete(filePath);
}
}
}
my problem:- if i do edit operation and edit image then delete old image from folder and update new image..... i write some code but proble is that when i use breakpoint then string photo got null value there is not coming any value....
plz someone help me ... thanking you
Reply
Answers (
4
)
How to export/Import Excel file To and from Sql database?
Add validation to check if the user has already made a loan?