modalpopupextender 调整屏幕大小?

发布于 2024-10-04 23:40:32 字数 487 浏览 5 评论 0原文

任何人都可以向我解释这是否是预期的行为。

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦回旧景 2024-10-11 23:40:32

刚刚处理过这个;然而它是 IE 独有的——FF、Chrome 和 Opera 适当地处理了该模式。我发现标题中的 DOCTYPE 需要设置为 XHTML 1.0 过渡而不是 HTML 4:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

需要

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

希望这会有所帮助。

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:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

needs to be

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Hope this helps.

高速公鹿 2024-10-11 23:40:32

谢谢。我实际上将其追踪到母版页中一个被严重注释掉的脚本标记。我仍然不知道为什么它没有抛出编译错误。感谢您的回复。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文