C#
Employee.ImgBody = (Employee.ImgBody == null) ? new byte[0] : Employee.ImgBody;
//Image saving code Byte[] imgByte = null;
if (txtEpPicture.HasFile && txtEpPicture.PostedFile != null)
{
//To create a PostedFile
HttpPostedFile File = txtEpPicture.PostedFile;
//Create byte Array with file len
imgByte = new Byte[File.ContentLength];
//force the control to load data in array
File.InputStream.Read(imgByte, 0, File.ContentLength);
Employee.ImgBody = imgByte;
}Code
empPicture.ImageUrl = string.Format("EmpPicture.ashx?id={0}", Employee.Id);

Saineshwar BageriRank #115 · 19.6K reputationPosted Apr 10, 2015, 9:11 PM EDT
http://www.aspsnippets.com/Articles/Display-image-from-database-in-Image-control-without-using-Generic-Handler-in-ASPNet.aspx
Mark as answer if i resolved your issue
Santhakumar MunuswamyRank #128 · 17.3K reputationPosted Apr 10, 2015, 9:20 PM EDT
Try this below link
http://www.c-sharpcorner.com/UploadFile/0c1bb2/uploading-and-displaying-images-from-database-using-Asp-Net/
http://www.aspnettutorials.com/tutorials/database/saving-retrieving-image-cs/
i hope, you will get an idea pls mark answer