控制页面静态
这个问题有点棘手,如果有什么不清楚的地方,请要求解释。
这种情况发生在遵循以下逻辑的所有页面上:
- 页面顶部的 asp:ValidationSummary
- 一些客户端验证器
- 一个 Telerik RadUpload 控件
当客户端验证器被触发并且其错误消息显示在 ValidationSummary 控件上时,就会出现此问题。页面上的每个控件都会“滑动”下来,为 ValidationSummary 控件创建空间,但 RadUpload 保持在同一位置,并最终位于其他一些控件的顶部。
如果我强制浏览器重新渲染页面(例如,将缩放更改为 125%,然后再更改回 100%),RadUpload 将显示在它应该显示的位置(向下滑动以为 ValidationSummary 控件提供空间)。
有人有解决这个问题的办法吗?现在我正在尝试使用 javascript 强制刷新,但这并不是那么简单......
This question is a bit tricky, If something is not clear, please ask to explain.
This is happing on all pages that follow this logic:
- An asp:ValidationSummary on top of the page
- Some client side validators
- One Telerik RadUpload control
The problem happens when a client side validator is triggered and it's error message is displayed at the ValidationSummary control. Every control on the page "slides" down to create space for the ValidationSummary control, but the RadUpload stays in the same place and ends up on top of some other control.
If I force the browser to re-render the page (as an example change zoom to 125% and then back to 100%) the RadUpload is displayed where it was suposed to be (slided down to give space for the ValidationSummary control).
Does any one has a solution for this problem? Right now I am trying to use javascript to force the refresh, but it's not so trival...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题很可能出在页面样式上 - 有 position: IE 的相对错误< /a>.如果有滚动容器,添加相对于它的位置:问题就会消失。
另一种选择是通过调用如下脚本来“重绘”RadUpload 控件:
或触发 IE 的 hasLayout< /a> 通过添加以下 CSS:(
选择器取决于您正在使用的套件版本 - 我假设 ASP.NET AJAX 在 2009 年第 1 季度之后)
It is highly probable that the problem lies with the page styling - there's the position: relative bug for IE. If there's a scrolling container, add position: relative to it and the problem should disappear.
Another option is to "redraw" the RadUpload control by calling a script like this:
or trigger IE's hasLayout by adding the following CSS:
(the selector depends on the suite version that you're using - I assume ASP.NET AJAX after Q1.2009)