I have tried changing the " to ' and have used DataBinder .Eval and now it
comes up with the error message
Control 'dlstProducts__ctl0__ctl0' of type 'ImageButton' must be placed
inside a form tag with runat=server.
But when I close the <asp:ImageButton with </asp:ImageButton> it still comes
up with error
Server tag not well formed.
Is this a problem with my compiler or something. It works perfectly with the
ordinary image control but not with the ImageButton control.
I really want to know what the problem is comeone help.
--
Iyke
"Phillip Williams" wrote:
I also missed correcting the syntax for databinding which should have been:
<asp:ImageButton runat="server" ImageUrl='<%#
DataBinder.Eval(Container.DataItem, "picturename") %>' />
"Phillip Williams" wrote:
You probably have figured out by now that you have typo in the syntax. You
needed to use single quotes to enclose the data binding expression because
the latter contains double quotation marks.
<asp:ImageButton runat="server"
ImageUrl='<%# Container.DataItem("pictues") %>' />
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"JuniorProgrammer" wrote:
Am trying to add an Image Button into a Datalist at Design time.
When I run it it comes up with error: Server tag not well formed.
It works perfectly when I add just an Image Control. Please help.
<asp:DataList
id="dlstframes"
runat="server">
<ItemTemplate>
<asp:ImageButton runat="server"
ImageUrl="<%# Container.DataItem("pictues") %>" />
</ItemTemplate>
</aspataList>
Please do help. I have serched thru the net to find something to solve this
problem. But cant find any clue.
--
Iyke