I have an Eval function in my aspx as below.
<asp:LinkButton ID="LinkButton1" runat="server"
OnClientClick='<%# "javascript:MyJSFunction(" + Eval("ObjectIdList") + ");return false;" %>'>
</asp:LinkButton>
The ObjectIdList is a list comma seperated ids as below from the server end
234,333,444,555
My javascript is as below
function MyJSFunction(Ids){
alert(Ids)
}
My javascript function only displays the first id of 234. I have tried putting single quotes as below but I get an error 'Server tag is not well formed'
<asp:LinkButton ID="LinkButton2" runat="server"
OnClientClick='<%# "javascript:MyJSFunction('" + Eval("ObjectIdList") + "');return false;" %>'>
</asp:LinkButton>
Please Help
Eval(...)part in<%# %>and then fix the quotes.