3

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?

1

1 Answer 1

5

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.