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
retrieve image from database
Mar 16 2018 1:44 AM
protected void btnUpdate_Click(object sender, EventArgs e)
{
string id = Request.QueryString["id"].ToString();
string qry = "update appformtbl set can_name=@can_name,fath_name=@fath_name,photo=@photo,sign=@sign,pass_gra=@pass_gra where id=" + id + "";
SqlConnection con = new SqlConnection(connection);
SqlCommand cmd = new SqlCommand(qry, con);
if (image1.HasFile)
{
image1.SaveAs(MapPath("~/Rimage/" + image1.FileName));
System.Drawing.Image img1 = System.Drawing.Image.FromFile(MapPath("~/Rimage/") + image1.FileName);
NormalImage.ImageUrl = "~/Rimage/" + image1.FileName;
}
else
{
var preimg = cmd.Parameters.AddWithValue("@photo", image1.ToString());
if (image1!= null)
{
preimg.Value = image1.FileName;-
}
}
cmd.Parameters.AddWithValue("@photo", SqlDbType.NVarChar).Value = image1.FileName.Trim();
my problem:-
hello friends, when i am updating new image then show in table but without change image click on update button then not find previous image... how to do it??? please help me.. thank you
Reply
Answers (
8
)
custom scope variable within ng-repeat using angularjs
Keep inner gridview after postback in Asp.net using Jquery