更新时间:2023-02-15 14:31:51
http://www.c-sharpcorner.com/UploadFile/satyapriyanayak/how-to-save-image-along-with-details-into-database-in- asp-ne / [ ^ ]
C#从数据库保存并加载图像 [ ^ ]
http://www.aspdotnet-suresh.com/2011/01/how-to-insert-images-into-database-and.html [ ^ ]
使用C#在ASP.NET Image Control中预览图像 [ ^ ]
它会帮助你。
嗨亲爱的,
请参考我之前的帖子从下面链接
如何在图像控件中显示数据库中已准备就绪的图像 [ ^ ]
how to retrive image form database and show in image control in asp.net
i use this for retrive image
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["EatProject"].ToString());
con.Open();
string str = "select Name,ImagePath,Link,Status from ImagesPath where ID ='" + DropDownList1.SelectedItem.Text + "'";
cmd = new SqlCommand(str, con);
dr = cmd.ExecuteReader();
while (dr.Read())
{
TextBox4.Text = dr["Name"].ToString();
//Image1.ImageUrl = dr["Imagepath"].ToString();
TextBox5.Text = dr["Link"].ToString();
TextBox6.Text = dr["Status"].ToString();
}
con.Close();
but image is not show in image control
http://www.c-sharpcorner.com/UploadFile/satyapriyanayak/how-to-save-image-along-with-details-into-database-in-asp-ne/[^]
C# Save and Load Image from Database[^]
http://www.aspdotnet-suresh.com/2011/01/how-to-insert-images-into-database-and.html[^]
Hi ,
Previewing Image in ASP.NET Image Control using C#[^]
it ll help you.
Hi Dear,
Please refer my previous post from below link
How to show images in image control which are all ready present in the database[^]