473,320 Members | 1,713 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

displaying a single image in repeater

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.
Nov 19 '05 #1
2 1839
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.
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.

Nov 19 '05 #2
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.

"Andrew" wrote:
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.
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.

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: marvin | last post by:
Hi, I am trying to display images in a repeater from a SQL database and do some transformations on the image prior to displaying them (such as thumbnail with a shadow). The problem is I can't...
4
by: Jon | last post by:
Hi, suspect there might not be a good answer to this one. Using vb.net I have a page like this some text datagrid repeater Now the repeater is populated from a simple query that takes no time...
1
by: Matthew Law | last post by:
Hi, I have a repeater in my vb.net page which needs to render an image control (it's a mappoint linedrive map image). The repeater itself is bound to an array of object 'Directions' which ...
4
by: nicholas | last post by:
Got an asp.net data-repeater on my page. I can view the texts from the database (ex.: <%# Databinder.Eval(Container.DataItem, "contentEN") %> ), but I also would like to see the image, but only if...
7
by: Jim | last post by:
I am trying to display images that are stored in a database, and I am using a repeater control. What I still use the Response.BinaryWrite method with a binding expression, if so, what with the...
3
by: CD | last post by:
An application is logging faxes sent in SQL2000 image column type. I have found code on the net but what it is doing is prompting to save to local which is fine for single page image. Not good...
1
by: vncntj | last post by:
I'm trying to display an image that is stored in a sql server db. <asp:Repeater ID="RepeaterControl" runat=server DataSourceID="SqlDataSource1"> <HeaderTemplate> <table border=1>...
0
by: Sully | last post by:
Hi Guys, I have this about 98% done and I cannot get it work properly. I have a Repeater bound to a MySQL DataSource, inside the Repeater I have an ImageButton, outside the repeater I have a...
1
by: Jeff | last post by:
hi asp.net 2.0 On my webpage I want to display a list of images. Most proparly display the list horizontal Sometimes I want only one image to be displayed and sometimes maybe 10 images....
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.