I have a question, I would like to know how can I add pictures to my datagrid? On my DB I have all images path ex.(/images/image001.jpg), is there a way that I can display that picture in the datagrid.
Jump to Post
try like this for gridview same will work for any databoundcontrol with small changes
<asp:TemplateField > <ItemTemplate > <asp:Image ID="Image1" runat="server" ImageUrl ='<%# "~/Images/"+Eval("filenamefromdb") %>' /> </ItemTemplate> </asp:TemplateField>
All 9 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.