tal_181
April 13th, 2006, 08:15 AM
how can i add an image into datagrid asp.NET ?
|
Click to See Complete Forum and Search --> : image in datagrid asp.NET tal_181 April 13th, 2006, 08:15 AM how can i add an image into datagrid asp.NET ? Roles April 13th, 2006, 10:25 AM you could use this to add an image to your dg, value in db as pic.png or pic.jpg <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> RobDog888 April 16th, 2006, 12:11 PM Or in a tables header cell. <asp:TableCell Text="<img src="../images/calendar.gif">></asp:TableCell> codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |