G
GD
I'm trying to bind (display) a SQL column to an <asp:image control. I was
under the impression that this could be achieved my pointing the ImageURL to
the databound column but it doesn't seem to work.
If I view the page source I can see that the ImageURL property has the value
'System.Byte[]' but no image is displayed.
By placing a STOP in the _ItemDatabound event I can see that the column does
contain data (DataBinder.Eval(e.Item.DataItem, "ThumbImage"))
Has anyone come across this before ?
Thanks
Gary
<aspataList id="ProductList" RepeatColumns="1" runat="server">
<ItemTemplate>
...
<asp:Image runat="server" id="imgPhoto" Visible="True"
ImageUrl='<%# DataBinder.Eval(Container.DataItem, "ThumbImage")%>'
width="100" height="100"></asp:Image>
...
</ItemTemplate>
</aspataList>
under the impression that this could be achieved my pointing the ImageURL to
the databound column but it doesn't seem to work.
If I view the page source I can see that the ImageURL property has the value
'System.Byte[]' but no image is displayed.
By placing a STOP in the _ItemDatabound event I can see that the column does
contain data (DataBinder.Eval(e.Item.DataItem, "ThumbImage"))
Has anyone come across this before ?
Thanks
Gary
<aspataList id="ProductList" RepeatColumns="1" runat="server">
<ItemTemplate>
...
<asp:Image runat="server" id="imgPhoto" Visible="True"
ImageUrl='<%# DataBinder.Eval(Container.DataItem, "ThumbImage")%>'
width="100" height="100"></asp:Image>
...
</ItemTemplate>
</aspataList>