For Retrieving image from database and displaying, you can use Handler.
use following code-
step1 :
protected void Page_Load(object sender, EventArgs e)
{
Image1.ImageUrl = "handler1.ashx?EmpID='1'";
}
step2: handler code
public void ProcessRequest(HttpContext context)
{
SqlConnection cn = new SqlConnection("YOUR CONNECTION STRING");
cn.Open();
string empid = context.Request.QueryString["EmpID"].ToString();
SqlCommand cmd = new SqlCommand("select empimage from empimageTABLE where empid=" + empid, cn);
SqlDataReader dr = cmd.ExecuteReader();
dr.Read();
context.Response.BinaryWrite((byte[])dr["empimage"]);
dr.Close();
cn.Close();
}
try this code and let me know.