How to pass bind or eval arguments with the client function “OnClientClicking”

前端 未结 2 1336
无人共我
无人共我 2020-12-18 06:01

I meet about problem to pass arguments to the client-side event OnClientClicking.

I tried to use the String.Format () function, but it does

相关标签:
2条回答
  • 2020-12-18 06:37

    try OnClientClicking='<%# Eval("MeetingID", "confirmCallBackFn({0})") %>'

    0 讨论(0)
  • 2020-12-18 06:45

    Change double quote to single quote from

    OnClientClicking="<%#string.Format("confirmCallBackFn('{0}');",Eval("MeetingID")) %>"
    

    to

    OnClientClicking='<%#string.Format("confirmCallBackFn('{0}');",Eval("MeetingID")) %>'
    

    Or remove your string.Format and use like this

    OnClientClicking='<%# "confirmCallBackFn("+ Eval("MeetingID") + ");" %>'
    
    0 讨论(0)
提交回复
热议问题