javascript - How to add eval value to onclick js function argument in asp datalist (Front-Side) -



javascript - How to add eval value to onclick js function argument in asp datalist (Front-Side) -

i trying add together javascript function checkbox included in datalist take id of command parameter.

i want on asp page not @ onitemdatabound method. tried 1 not working. ideas?

<asp:checkbox id='chkdatabase' runat="server" cssclass="normalbold" text='<%# eval("name") %>' onclick='javascript:showme("<%# eval("id") %>")' ></asp:checkbox>

part of datalist code:

<asp:datalist runat="server" id="ddldatabases" cssclass="ddldatabases" cellspacing="0" cellpadding="0" repeatlayout="table" onitemdatabound="ddlcount_itemdatabound"> <itemtemplate> <div style=" float: left; width:150px;padding:20px; " > <asp:checkbox id='chkdatabase' runat="server " cssclass="normalbold " text='<%# eval("name ") %>' onclick='javascript:showme("<%# eval("id") %>")' > </asp:checkbox> </div> </itemtemplate> </asp:datalist>

thanks in advance!

try utilize + operator within <%# ...%> this:

onclick='<%# showme(" + eval("id") + ")"%>'>

there no need utilize javascript.

javascript asp.net

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -