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:


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">
             <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">
                        <asp:Image ID="Image2" runat="server" ImageUrl='<%# Eval("imageSrc") %>' AlternateText='<%# Eval("imageSrc") %>' />


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.


i've read through that article but still having difficulty, it just writes the source of the image rather than the image itself?