0
<asp:Image Width="100" ID="imgEmp" ImageUrl='<%# Bind("Picture", "~/{0}") %>' runat="server" />
I have updated the code. Check it will work for you. let me know if still facing same issue.
Accepted 1
Hello,
Can you please tell me ? What you shaving in database . image name or image path with Name .
<asp:Image Width="100" ID="imgEmp" ImageUrl='<%# Bind("Picture", "~/petpic/{0}") %>' runat="server" />
Let me know if any help required.
Try This Hope it will help you . Accept answer , SO it will help next developer to solve same issue
0
Great. Accept answer, if it works for you . It will help next develop for solve same issue
0
ok thank u it worked
0
Accept answer if it works for you .
0
and in coding:
if (PictureUpload.HasFile == true)
{
petImage = Path.GetFileName(PictureUpload.PostedFile.FileName);
PictureUpload.SaveAs(Server.MapPath("petpic/" + petImage));
}
0
in the db table:
Picture varchar(max)
once i add picture it shows:
petpic/sheep.jpg
0
hello this is the link i refer to do the above.. but the image doesnt appear
0
Hi,
Read the below article..
http://www.dotnetfox.com/articles/how-to-display-images-in-datalist-control-using-Asp-Net-with-C-Sharp-1037.aspx