modalpopupextender 调整屏幕大小?
任何人都可以向我解释这是否是预期的行为。
我有一个 asp.net 网站,看起来不错,所有内容都适合在一页上,因此不需要滚动。当用户单击特定按钮时,我尝试使用 modalpopupextender 显示附加内容。显示的内容位于面板内部,并且在加载时不会显示,因为使用了 display:none 。
问题是,当用户单击按钮时,面板内容会显示,但它将屏幕的该部分的大小调整为屏幕的完整宽度和高度,因此表视图内的其他元素现在移离屏幕。它还添加了一个垂直和水平滚动条,可以永远滚动,永不停止。
我对此进行了数小时的研究,并通过设置溢出:隐藏等尝试了我发现的所有内容...溢出隐藏会起作用,除非屏幕上的所有其他元素都被移到无人区。
问题是,当显示面板并将其他元素移出屏幕时,modalpopupextender 是否应该影响大小?当我在另一台机器上运行代码时,它不起作用,所以我想知道这是否可能是我正在使用的 Ajax 工具包版本中的错误,但我不确定如何检查已安装的版本。
感谢您的想法。
Can anyone PLEASE explain to me if this is expected behavior.
I have an asp.net site that looks good and all fits on one page so no scrolling is needed. I am trying to show additional content by using the modalpopupextender when the user clicks a specific button. The content shown is inside a panel and not shown on load since the display:none is used.
The problem is that when the user clicks the button, the panel content shows BUT it resizes that portion of the screen to be the full width and height of the screen so other elements inside the table view are now shifted way off of the screen. It also adds a vertical and horizontal scrollbar that scrolls forever and never stops.
I have done hours of research on this and have tried everything I have found by setting the overflow:hidden etc... The overflow hidden would work except that all of the other elements on the screen get moved way out into no mans land.
The question is, should the modalpopupextender be affecting the size when the panel is shown and shifting the other elements off of the screen? It doesn't do when I run the code on another machine, so I am wondering if it could be a bug in the Ajax toolkit version I am using but I am not sure how to check the version that is installed.
Thanks for the ideas.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
刚刚处理过这个;然而它是 IE 独有的——FF、Chrome 和 Opera 适当地处理了该模式。我发现标题中的 DOCTYPE 需要设置为 XHTML 1.0 过渡而不是 HTML 4:
需要
希望这会有所帮助。
Just dealt with this; however it was exclusive to IE---FF, Chrome and Opera handled the modal appropriately. I discovered that the DOCTYPE needed to be set to XHTML 1.0 transitional instead of HTML 4 in header:
needs to be
Hope this helps.
谢谢。我实际上将其追踪到母版页中一个被严重注释掉的脚本标记。我仍然不知道为什么它没有抛出编译错误。感谢您的回复。
Thanks. I actually tracked it down to a badly commented out script tag in the master page. I still don't know why it didn't throw a compile error. Thanks for the reply.