验证器摘要不会动态更新
我有一个验证摘要,用于RequiredFieldValidators 用于显示错误消息,同时图像显示在正在验证的控件旁边。我已将必需的字段验证器设置为 Display="Dynamic"。当我在下拉列表中选择某些内容时,它会像我想要的那样立即删除控件旁边的图像,但错误消息文本保留在 ValidatorSummary 上。
当删除下拉列表旁边的图像时,我该怎么做才能使 ValidatorSummary 像RequiredFieldValidator 一样动态更新?
谢谢
I have a validation Summary I am using for the RequiredFieldValidators to use to show the error messages while an image shows up next to the controls being validated. I have set the required field validator to Display="Dynamic". When I select something in the dropdown it removes the image next to the control right away like I want but the errormessage text stays on the ValidatorSummary.
What can I do to make the ValidatorSummary to update dynamically like the RequiredFieldValidator when it removes the image next to the dropdown?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Display="Dynamic" 并不是使必填字段验证器“动态”显示的原因。该设置用于确定页面是否为页面上的字段分配空间,即使该字段是隐藏的。它更多的是页面显示设置。
检查验证摘要的“EnableClientScript”属性。将其设置为 true;这就是验证器无需回发到服务器即可工作的原因。
Display="Dynamic" isn't what makes the Required Field Validator show up "dynamically". That setting is for whether the page allocates the space for the field on the page even if it is hidden. It's more of a page display setting.
Check the "EnableClientScript" property for your Validation Summary. Set it to true; that is what makes the validators work without having to post back to the server.