Image name from database

  • Thread starter Thread starter Joe via DotNetMonster.com
  • Start date Start date
J

Joe via DotNetMonster.com

Hi,

I'm not sure how to get the image name from the database into the HTML img
tag. I can get regular text. For the img tag, this is what I have:

<img src="../images/<ASP:Repeater id="RepeaterMediaName" runat="server"
DataSource="<%# GetImage(MediaName) %>"><ItemTemplate><%# DataBinder.Eval
(Container.DataItem, "MediaName") %></ItemTemplate></ASP:Repeater>"
border="0" />

I get blank for the image name. Can I put a Repeater control within an img
tag?

Thanks
 
Hi Joe:

You wouldn't want a reapeater inside the image tag like that.

Are you trying to display multiple images or just a single image? Is
the MediaName in a DataSet or reader or ... ?
 
Back
Top