Hi,
I've currently got a gridView which selects data from my table, it also has the URL of an image in one of the columns.
I want an imageField which can then display the image from the URL thats provided in the image column.
My datagrid:
[img]http://i41.tinypic.com/25ivst2.jpg[/img]
My code for the DataGrid:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataSourceID="SqlDataSource1" Height="234px" Width="459px" AllowPaging="True"
AllowSorting="True" onselectedindexchanged="GridView1_SelectedIndexChanged">
<Columns>
<asp:BoundField DataField="imageSrc" HeaderText="imageSrc"
SortExpression="imageSrc" />
<asp:BoundField DataField="CoffeeName" HeaderText="Coffee"
SortExpression="CoffeeName" />
<asp:BoundField DataField="CoffeeStrength" HeaderText="Strength"
SortExpression="CoffeeStrength" />
<asp:BoundField DataField="CoffeeGrind" HeaderText="Grind"
SortExpression="CoffeeGrind" />
<asp:BoundField DataField="StockLevel" HeaderText="Stock"
SortExpression="StockLevel" />
<asp:TemplateField HeaderText="Icon">
<ItemTemplate>
<asp:Image ID="Image2" runat="server" ImageUrl='<%# Eval("imageSrc") %>' AlternateText='<%# Eval("imageSrc") %>' />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
As you can see the URL displays perfectly however I now want that URL image to be displayed in the GridView (icon column) as an actual Image.
Thank you.