how can i add an image into datagrid asp.NET ?
Printable View
how can i add an image into datagrid asp.NET ?
you could use this to add an image to your dg, value in db as pic.png or pic.jpg
Code:<asp:TemplateColumn HeaderStyle-Width="125" HeaderText="text">
<ItemTemplate>
<asp:Image Width="150" Height="150" ImageUrl='<%#("http:\\localhost\yourmap\Images\"+DataBinder.Eval(Container.DataItem, "datafield")) %>' runat="server" ID="Image1" />
</ItemTemplate>
</asp:TemplateColumn>
Or in a tables header cell.
Code:<asp:TableCell Text="<img src="../images/calendar.gif">></asp:TableCell>