there is a problem about javascript and DataBinder that I can't solved finally.

K

Kylin

I have a data list and bind it's datasource to a DataSet ,
about data item ,
I write a javascript that can open a custom window to show the page ,
but in dataitem ,I use this function ,
only get the '<% ',
the code in the aspx page like this ?
how can I use the javascript function in data item with databinder ?

<asp:datalist id="DL_ProductImg" runat="server" Height="106px"
RepeatColumns="2" Width="93%">
<ItemStyle HorizontalAlign="Left" Height="4px"></ItemStyle>
<ItemTemplate>
<a
onclick="open_itemwin('<%#DataBinder.Eval(Container.DataItem,ProductData.PRODUCTID_FIELD)%>')"
href="#" runat=server ID="A1">
<asp:Image ImageUrl='<%# "../images/ProductImg/"+
DataBinder.Eval(Container.DataItem,ProductData.IMGPATH_FIELD) %>' Text='<%#
DataBinder.Eval(Container.DataItem,ProductData.PNAME_FIELD) %>' Height=50
Width=115 Runat=server ID="Image1"
NAME="Image1"></asp:Image></a>
</ItemTemplate>
</asp:datalist>





--
FireCrow Studio
Kylin Garden
QQ:462042991
MSN:[email protected]
ICQ:156134382
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top