Hi,
I am assuming you have saved the image path in database.
Try following code.
in Aspx page.
<asp:gridview id="grid" runat="server" onrowdatabound="grid_RowDataBound" xmlns:asp="#unknown">
<columns>
<asp:templatefield>
<itemtemplate>
<asp:image runat="server" id="img" width="100px" height="100px" />
</itemtemplate>
</asp:templatefield>
</columns>
</asp:gridview>
in your code behind
protected void grid_RowDataBound(Object sender, GridViewRowEventArgs args)
{
if (args.Row.RowType == DataControlRowType.DataRow)
{
DataRowView rowView = (DataRowView)args.Row.DataItem;
Image img = (Image)args.Row.FindControl("img");
img.ImageUrl = rowView["Images"].ToString();
}
}
Note this is faster than using EVAL or bind in your aspx.
Hope this helps.