I would like to send the parameters (ID of the database, ClientID) to a <asp:Hyperlink
. I wanted the final result to be:
<a id="ctl00" onclick="OpenModal(704520,'asdf_ID_DaImageAbaixo')">
<img id="ID_IMAGE" src="../online/img_admin/icon_hist.gif" />
</a>
But I can not do 2 things. First the single quotation marks is not working.
String.Format("AbreModal({0},'{1}')",
Give Unformatted tag with these single quotes. Without them it works, but then it does not close in JavaScript.
Second: I can not capture the image ID below and send this link, I'm trying:
<asp:HyperLink ID="HyperLink4" runat="server" onclick='<%# String.Format("AbreModal({0},{1})", DataBinder.Eval(Container.DataItem, "intid"),"123" ) %>'>
<asp:Image ID="img_Historico" runat="server" ImageUrl="../online/img_admin/icon_hist_off.png" />
</asp:HyperLink>
How to submit?