问题描述
我遇到有关问题的参数传递到客户端事件 OnClientClicking
。
I meet about problem to pass arguments to the client-side event OnClientClicking
.
我试图使用的String.Format()
的功能,但它不能正常工作。
I tried to use the String.Format ()
function, but it does not work.
你有一个解决方法,发送带有 OnClientClicking
?
Do you have an idea for a workaround to send parameter linked with OnClientClicking
?
code ASP
:
<telerik:RadButton ID="bnt_meetingDelete" runat="server" OnClientClicking="<%# string.Format("confirmCallBackFn('{0}');",Eval("MeetingID")) %>" Image-ImageUrl="~/image/icone/delete-icon.png" Image-IsBackgroundImage="true" Width="21" Height="21" telerik:RadButton>
错误 IIS
:
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The server tag is not well formed.
我试着用控制器[ASP:ImageButton的。而且是同样的错误
I tried with controller [asp: ImageButton ]. And is the same mistake
推荐答案
更改双引号为单引号
OnClientClicking =&LT;%#的String.Format(confirmCallBackFn('{0}');的eval(MeetingID))%&gt;中
到
OnClientClicking ='&LT;%#的String.Format(confirmCallBackFn('{0}');的eval(MeetingID))%&GT;
或删除的String.Format
和使用这样
OnClientClicking='<%# "confirmCallBackFn("+ Eval("MeetingID") + ");" %>'
这篇关于如何通过绑定或者与客户端功能与QUOT EVAL参数; OnClientClicking&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!