I am trying add picture boxes dynamically. My code is as
PictureBox picture = new PictureBox
{
Name = "pictureBox",
Size = new Size(100, 150),
Location = new Point(14, 17),
Visible=true
};
picture.ImageLocation = @"Image\80knhk00003.jpg";
pnlDisplayImage.Controls.Add(picture);
I have created Images Folder in project and added this image. Still when I run my code I can see only red cross.
I tried doing google. And I am getting similar solutions only. I dont know what is wrong in my code.
Along with this if I am storing image file location in database then how can I display such images in picture box? Please help