You need to create a handler to show the image from database.
Here is a ode snippet,
In aspx page
<itemtemplate>
<img id="imgTest" src="showimage.ashx?newsid=<%# Eval(" news_id=") %>">
width="100px" height="100px" title="<%# Eval("news_title") %>" />
</img></itemtemplate>
Creating the Handler (showimage.ashx)
public void ProcessRequest(HttpContext context)
{
using (SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["CONN_STRING"].ConnectionString))
{
SqlCommand command = new SqlCommand("Select news_image from tbl_news where newis_id = '" + context.Request.QueryString["newsid"] + "'", connection);
connection.Open();
SqlDataReader dr = command.ExecuteReader(CommandBehavior.CloseConnection);
while (dr.Read())
{
if (dr["news_image"].ToString().Length > 0)
{
context.Response.BinaryWrite((byte[])dr["newsimage"]);
}
}
}
}
This will show the image in gridvuew.
Hope this helps.
cheers