I'm trying this code inside a asp:hyppelink
inside a repeater.
OnClientClick='openURL( "<%# Eval("UrlPagamento")%>", "<%# Eval("IdPedido")%>")'>
and the outcome after compilling is this:
<a class="btnPequeno" onclientclick="openURL( "<%# Eval("UrlPagamento")%>", "<%# Eval("IdPedido")%>")" href="#">Pagar</a>
I tried to change the symbols " and ' but then I just got a syntax error.
Any idea how to solve it?
You have to bind all the string elements inside the databinding expression and escape the '
with '
OnClientClick='<%# "openURL('" + Eval("UrlPagamento") + "', '" + Eval("IdPedido") + "')" %>'