J
John Stemper
I've got a problem getting a data element in a Databound datalist to tie in
with an Imagebutton control in the ItemTemplate of the Datalist control.
I've attached the code below. The second dataelement (Name) works fine but
the first one (ImageFileName) doesn't work.
Anyone have any ideas?
TIA
John
<asp:datalist id="dlDesigns" runat="server" HorizontalAlign="Center"
ShowFooter="False" RepeatColumns="3" RepeatDirection="Horizontal"
ShowHeader="False">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<ItemTemplate>
<asp:ImageButton id="imBtn" runat="server" OnClick="dlSelectEvent"
ImageUrl="/images/<%# DataBinder.Eval(Container,'DataItem.ImageFileName')%">
</asp:ImageButton>
<BR>
Name: <%#DataBinder.Eval(Container, "DataItem.Name") %>
</ItemTemplate>
</asp:datalist>
with an Imagebutton control in the ItemTemplate of the Datalist control.
I've attached the code below. The second dataelement (Name) works fine but
the first one (ImageFileName) doesn't work.
Anyone have any ideas?
TIA
John
<asp:datalist id="dlDesigns" runat="server" HorizontalAlign="Center"
ShowFooter="False" RepeatColumns="3" RepeatDirection="Horizontal"
ShowHeader="False">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<ItemTemplate>
<asp:ImageButton id="imBtn" runat="server" OnClick="dlSelectEvent"
ImageUrl="/images/<%# DataBinder.Eval(Container,'DataItem.ImageFileName')%">
</asp:ImageButton>
<BR>
Name: <%#DataBinder.Eval(Container, "DataItem.Name") %>
</ItemTemplate>
</asp:datalist>