I try to pass Eval value like this but get syntax errors:
<asp:ImageButton ID="btnOK" OnClientClick='Show("<%#Eval("Title")%>");return false;' runat="server" ImageUrl="Images/icon.gif" />
Try this instead.
<asp:ImageButton ID="btnOK" OnClientClick='<%# Eval("Title", "Show({0});return false;") %>' runat="server" ImageUrl="Images/icon.gif" />
OnClientClick='<%#String.Format("Show('{0}');return false;",Eval("title"))%>'
or you if do it in the design view just add a databinding for the imagebutton's onClientClick property as
String.Format("Show('{0}');return false;",Eval("title"))
hope it helps you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With