Skip to content

How to Load Image Location Data From DB to PictureBox

Antony Alston

Asked Jul 27, 2014, 10:44 PM EDT1 answer
Share
LinkedInX
I have sql database where i have image as saved image location
eg:- D:\Local Pictures\Users\XXXX_XXXX_1.jpg
I trying to place it in the picture box using this code (i have posted only partial code)
string filename = (myReader["PROFILE_PICTURE"].ToString());
profilePicBox.ImageLocation = filename;
when i execute this code I am getting small x picture white background in image. Can anyone help me to fix and load the image

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    filename must be assigned with "@" symbols, example like below-
    profilePicBox.ImageLocation = @filename;
    0