简体   繁体   English

asp.net ValidationSummary location / focus

[英]asp.net ValidationSummary location/focus

I am using asp.net ValidationSummary. 我正在使用asp.net ValidationSummary。 my form is 1.5 of the screen which means user can not see the complete form at a time and s/he has to scroll. 我的表格是屏幕的1.5,这意味着用户无法一次看到完整的表格,他/她必须滚动。 The ValidationSummary is located at the bottom of the page. ValidationSummary位于页面底部。 User is at the top of the page and error occurs then s/he won't be able to see the ValidationSummary because neither this control gets focus nor it makes the browser scroll down to show itself. 用户位于页面顶部并发生错误,然后他/她将无法看到ValidationSummary,因为此控件既不会获得焦点也不会使浏览器向下滚动以显示自身。 The case is same if user is at the bottom of the page and ValidationSummary is at the top. 如果用户位于页面底部并且ValidationSummary位于顶部,则情况相同。

Please suggest how to show this ValidationSummary automatically ? 请建议如何自动显示此ValidationSummary?

I find the validation summary isn't the most user friendly for long forms especially when scrolling appears. 我发现验证摘要对于长格式不是最友好的,特别是在滚动出现时。

Why not remove the validation summary and highlight the fields with the errors with a validation errror message beside the control and a visual idicator beside the submit button? 为什么不删除验证摘要并使用控件旁边的验证错误消息和提交按钮旁边的可视对象突出显示错误的字段? This appraoch would be a lot mroe user friendly 这个appraoch将是很多用户友好的mroe

Why don't you move the ValidationSummary to the top then? 为什么不将ValidationSummary移到顶部呢?

Or just style the ValidationSummary . 或者只是设置ValidationSummary的样式

This is a UI problem, not a technical one. 这是一个UI问题,而不是技术问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM