- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在取消选中 asp.net CheckedChanged 事件时,我从 UserControl 的服务器端调用 Telerik 的 RadConfirm。 UserControl 在 ASP.NET 网页中重复多次
如果未选中,那么我将抛出错误消息
radWindowManager.RadConfirm("Are you sure you want to clear controls?", "confirmCallBackFn", 300, 100, null, "");
如果参数为真,那么我将清除并禁用所有相关控件
当我单击第一个 UserControl 的复选框时,它会为最后一个 UserControl 触发。它始终为最后一个用户控件工作。下面是它的脚本
function confirmCallBackFn(arg)
{
if (arg == true)
{
$find('<%= FindControl("txtAmount").ClientID %>').disable();
}
}
最佳答案
使每个用户控件实例的回调函数名称都是唯一的,否则最后一个实例将覆盖其他实例:http://www.telerik.com/support/kb/aspnet-ajax/details/using-dynamic-unique-names-for-javascript-functions .
radWindowManager.RadConfirm("Are you sure you want to clear controls?",
"confirmCallBackFn" + this.ClientID,
300, 100, null, "");
和
function confirmCallBackFn<%=this.ClientID%>(arg) {
关于javascript - Telerik RadConfirm 不适用于 asp.net 的 UserControls,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39451236/
我的代码如下,对于 ASPX--> Javascript --> var
如何从 JavaScript 使用 radconfirm?未定义函数 radalert 或 radconfirm。有人可以给我看看 sample 吗? 例如,当我调用这个函数时,我得到 radaler
在取消选中 asp.net CheckedChanged 事件时,我从 UserControl 的服务器端调用 Telerik 的 RadConfirm。 UserControl 在 ASP.NET
我是一名优秀的程序员,十分优秀!