JQuery asp.net 验证器标注插件 updatepanel

发布于 2024-07-28 22:35:28 字数 436 浏览 1 评论 0原文

我正在使用这个插件:

http://plugins.jquery.com/project/updnValidatorCallout

这个要验证的控件位于更新面板内。 在回发之前一切正常,在异步回发之后,标注插件会变得混乱。

我正在像这样初始化插件:

$(document).ready(function() {
    $.updnValidatorCallout.attachAll();
});

我尝试将其放入 UpdatePanel 的 pageLoad 和 endRequest 中,但没有成功。

有人知道更多吗?

I am using this plugin:

http://plugins.jquery.com/project/updnValidatorCallout

This controls to be validated are inside an updatepanel. Before posting back everything works fine, after a async postback the callout plugin messes up.

I'm initializing the plugin like so:

$(document).ready(function() {
    $.updnValidatorCallout.attachAll();
});

I tried putting this in the pageLoad and endRequest of the UpdatePanel but with no success.

Anyone knows more about this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

写下不归期 2024-08-04 22:35:28

这是由 UpdatePanel 的工作方式决定的。 当 UpdatePanel 刷新时,它将替换其中包含的内容。 这将破坏您的插件,因为它将无法找到原始插件。

要解决此问题,请在 UpdatePanel 完成刷新后调用此“attachAll”方法以再次绑定它。

This is due to how the UpdatePanel works. When UpdatePanel refreshes, it will replace the content enclosed inside it. This will break your plugin because it will not be able to find the original plugin.

To resolve this, call this 'attachAll' method when the UpdatePanel has finished refreshing to bind it again.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文