displaying a single image in repeater

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

How do I display a single image in a repeater control ? I only have 1
picture to display for ONE of my records.

TIA.
Andrew.
 
Continuation from above.

I have 2 columns in my table for the picture:
-picture : datatype image 16bytes
-picturePath : datatype nvarchar, the path to the picture itself.

Is what I am doing correct ? The value in the picture column is <binary>,
should I be putting some info in there ?

For development purposes, I have placed the picture in the same folder as
the source code. The database resides on another pc on the network which i
don't have access to at the moment.

TIA.
Andrew.
 
I got it already, seems it was a logic error. In case anyone wants to know how:

<asp:Image id="picture" runat="server" BorderWidth="0px"
ImageUrl='<%# DataBinder.Eval(Container.DataItem, "picturePath")%>'
visible='<%# DataBinder.Eval(Container.DataItem, "picture").ToString() != "n"
%>'>
</asp:Image>

Cheers.
 
Back
Top