G
gemel
I am developing an application that uses SQL 2000 as my source of
images. I have successfully created the code to load the images onto
the SQL Server and also to retrieve the images into a dataset. I
tested the application by populating a Dataset with the images from
SQL Server and rendered just one of the images by using a bitmap and
inserting the resulting stream into the response stream as a Jpeg
format.
My next move was to bind this returned set to an image control that I
included in a Repeater control. I set the datasource property in code
as follows:
ds = si.SqlBLOB2DS("GdsTest", "Picture", "Category", "Test")
GdsPicsRepeater.DataSource = ds.Tables(0).DefaultView
GdsPicsRepeater.DataBind()
The I included the follwing in the HTML view:
<asp:Repeater id="GdsPicsRepeater" runat="server">
<ItemTemplate>
<table>
<tr>
<td>
<img src= <%#
DataBinder.Eval(Container,"DataItem.Picture")%>
</td>
</tr>
</table>
</ItemTemplate>
</asp:Repeater>
When the repeater is rendered it shows the correct number of images
from the dataset, but it doesn't show the actual image.
I am not using the response steam in this case.
Any help please?
Regards
John L
images. I have successfully created the code to load the images onto
the SQL Server and also to retrieve the images into a dataset. I
tested the application by populating a Dataset with the images from
SQL Server and rendered just one of the images by using a bitmap and
inserting the resulting stream into the response stream as a Jpeg
format.
My next move was to bind this returned set to an image control that I
included in a Repeater control. I set the datasource property in code
as follows:
ds = si.SqlBLOB2DS("GdsTest", "Picture", "Category", "Test")
GdsPicsRepeater.DataSource = ds.Tables(0).DefaultView
GdsPicsRepeater.DataBind()
The I included the follwing in the HTML view:
<asp:Repeater id="GdsPicsRepeater" runat="server">
<ItemTemplate>
<table>
<tr>
<td>
<img src= <%#
DataBinder.Eval(Container,"DataItem.Picture")%>
</td>
</tr>
</table>
</ItemTemplate>
</asp:Repeater>
When the repeater is rendered it shows the correct number of images
from the dataset, but it doesn't show the actual image.
I am not using the response steam in this case.
Any help please?
Regards
John L