Reputation:
I already know how it works with a single parameter
OnClientClick='<%# String.Format("confirm_ticket({0});return false;",DataBinder.Eval(Container,"DataItem.idAgir"))%> '
but is it possible to pass 2 parameters?
Upvotes: 3
Views: 8524
Reputation: 10095
Suppose functions is...
<script language = 'javascript'>
function confirm_ticket(ID, ID1)
{
}
</script>
OnClientClick='<%# String.Format("confirm_ticket({0},{1});
return false;",Eval("idAgir"), Eval("idAgir"))%> '
Alternatively you can move in ItemBoundData
and there also the string can be concatenated.
Upvotes: 5