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
19.2k
image delete from folder in edit opreation
Feb 25 2018 10:51 AM
in edit opreation when click update image then delete old image from folder like database....
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string id = Request.QueryString["id"].ToString();
string photo = Request.QueryString["image1"].ToString();
editdata(id);
LoadImage(id);
imgdltdata(id,photo);
}
}
private void imgdltdata(string id, string photo)
{
string qry = "delete from appformtbl where photo=" + photo + " id=" + id + "";
System.IO.File.Delete(image1.PostedFile.FileName);
}
this is my code.....
i got error Object reference not set to an instance of an object.
in string photo.....
plz someone help me......
Reply
Answers (
2
)
how to integrate stripe payment gateway in asp.net or MVC
How browser cache web site pages