如何创建与 UpdatePanel 一起使用的自定义 asp.net 验证器?
我认为这个主题总结得很好......
我创建了自定义验证器,当我将它们放在设计模式下的页面上时,它们工作得很好。但是,如果我将它们放在用户控件中,然后尝试通过 updatepanel 将此用户控件添加到父页面,那么我的自定义验证器将不会触发。它们根本不起作用。
有人知道我必须在这里做什么吗?
.net 3.5
I think that subject summs it pretty well...
I have created my custom validators that work great when I put them on page in design mode. However if I place them in a usercontrol, and then try to add this user control to the parent page via updatepanel, then my custom validators just won't trigger. They simply don't work.
Does anyone have any clue on what I have to do here?
.net 3.5
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
自定义验证器在回发时触发。
我的猜测是,使用更新面板,您不会发回,因此验证器不会触发。
Custom validators trigger on postback.
My guess is that with the update panel, you're not posting back, hence the validator not firing.