The problem at hand is that I have a Repeater control looping through a sql table creating image buttons. In the aspx file I have a databinder pulling the image location, but it keeps dumping the text as a literal text chunk as opposed to data fromthe database..
The databinder outside the imagebutton references the DB item properly but when I look at the code for the img url that gets generated I get:
If I remove the the '../images/icons/' part of the imagbutton code the data gets gets loaded correctly (but since it doesnt have the right folder there the image doesnt show up)..
I know it has to do with how <%# %> is dumping the text so how I get it dump data and not written literally..
Any thoughts?
wbochar
Code:
<asp:Repeater id="RepeaterIcon" runat="server">
<HeaderTemplate>
<table align="left"><tr>
</HeaderTemplate>
<ItemTemplate>
<td>
<asp:ImageButton Runat=server ImageUrl='../images/icons/<%#DataBinder.Eval(Container.DataItem, "ICON_FILENAME")%>' ID='ICON'></asp:ImageButton>
<%# DataBinder.Eval(Container.DataItem, "ICON_FILENAME") %>
</td>
</ItemTemplate>
<FooterTemplate>
</tr></table>
</FooterTemplate>
</asp:Repeater>
The databinder outside the imagebutton references the DB item properly but when I look at the code for the img url that gets generated I get:
Code:
<td>
<input type="image" name="RepeaterIcon:_ctl5:ICON" id="RepeaterIcon__ctl5_ICON" src="../images/icons/<%#DataBinder.Eval(Container.DataItem, "ICON_FILENAME")%>" border="0" />
CV5.JPG
</td>
If I remove the the '../images/icons/' part of the imagbutton code the data gets gets loaded correctly (but since it doesnt have the right folder there the image doesnt show up)..
I know it has to do with how <%# %> is dumping the text so how I get it dump data and not written literally..
Any thoughts?
wbochar