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

java Multi query from Mysql using netbeans -

c# - DotNetZip fails with "stream does not support seek operations" -

c++ - StartServiceCtrlDispatcher don't can access 1063 error -