i tried below code
public void imagefetch()
{
DataSet ds = new DataSet();
DataTable dt = new DataTable();
SqlConnection imagecon = new SqlConnection(onlineexam_Conn);
string imagequery = "select rcimage,permitimage,pollutionimage,fitnessimage,taximage,insuranceimage from gps_vehicledetails where registration='" + vehicleSelect.SelectedItem.ToString() + "'";
SqlDataAdapter da = new SqlDataAdapter(imagequery, imagecon);
da.Fill(ds);
dt = ds.Tables[0];
showimages.DataSource = dt;
showimages.DataBind();
imagecon.Close();
}
showimages
is a grid control but i am unable to fetch image in grid. plese help me
public void ProcessRequestt(HttpContext context)
{
DataTable dt = new DataTable();
SqlConnection connection = new SqlConnection(onlineexam_Conn);
SqlCommand command = new SqlCommand("select rcimage,permitimage,pollutionimage,fitnessimage,taximage,insuranceimage from gps_vehicledetails where registration='AP 29 TA 1966'", connection);
connection.Open();
SqlDataReader dr = command.ExecuteReader();
dr.Read();
context.Response.BinaryWrite((Byte[])dr[0]);
showimages.DataSource = dr;
showimages.DataBind();
connection.Close();
context.Response.End();
}
in page load i am using image control property to retrieve image from database but i am unable to fetch image in image control. Please help me