Can not display the image from database directly
Hi all,
I have a little problem to display a image( gif file) in my webpage.
The images are stored in sqlserver 2000 table and datatype as sqlserver.image ( actualy is byte[]). When I retrieve records from database, the image colum is return as a stream of data. On my webpage, I have the following
<asp:TemplateColumn HeaderText="Picture">
<ItemTemplate>
<img id=myImage border=0 runat="server" width=30 height=30
src="<%#Databinder.Eval(Container.DataItem,"pictur e")%>" />
</ItemTemplate>
Insteads show the images, the column shows "System.Byte[]". I know src is not the right property in this case but I dont know how to fix it right now. Please help me to fix the problem.
Thanks
</asp:TemplateColumn>
|