Hi, Can anyone help me with displaying images in the list view for the records ? My database has an Images table which associates an image with a record based on a ForeignKey and is also containg a column with the url of the image (most images would probably be stored locally in the Images folder of the project therefore the url would probably be something like "~\Images\Img1.gif"). Thank you!
It's pretty str8 forward. Just add an image control inside the ItemTemplate e.g. <ItemTemplate> <asp:Image ID="MyImage" runat="server" ImageUrl='<%# Eval("ColumnName") %>' /> </ItemTemplate> Code (markup):
It is very easy to add image in view list just type the code as: <ItemTemplate> <asp:Image ID="MyImage" runat="server" ImageUrl='<%# Eval("ColumnName") %>' /> </ItemTemplate>