dimanche 19 avril 2015

Retrieve image and display in picturebox with image path stored in database c#

I have Image Paths stored in my database under a column called Image in the format of Images\ac.jpg The path is already stored in a textbox called txtImage.Text. I am trying to display it in a picturebox control but I get the following error:



An unhandled exception of type 'System.IO.FileNotFoundException' occurred in System.Drawing.dll


Additional information: Images\ac.jpg




pbCoffeeImage.Image = System.Drawing.Image.FromFile(txtImage.Text);

Aucun commentaire:

Enregistrer un commentaire