Hi,
Here i am saving the image to database. for saving image, convert image into stream of bytes.
Now i am binding the image to dropdownlist. when binding image from database instead of image, getting bytecode. now how can i convert the bytecode into image and bind to dropdownlist. if anyone knows please help me.....
For saving the image to database,here is my code:
FileUpload img = (FileUpload)FileUpload1;
Byte[] imgByte = null;
if (img.HasFile && img.PostedFile != null)
{
HttpPostedFile File = FileUpload1.PostedFile;
imgByte = new Byte[File.ContentLength];
File.InputStream.Read(imgByte, 0, File.ContentLength);
contents = enc8.GetString(imgByte);
pathName = "UploadImages/" + Path.GetFileName(FileUpload1.PostedFile.FileName);
FileUpload1.SaveA ...
Go to the complete details ...