【发布时间】:2020-02-08 09:08:39
【问题描述】:
当用户单击导致部分回发的按钮时,当按钮位于该更新面板内的可滚动 div 元素内时(当没有滚动的 div 不闪烁时),UpdatePanel 会闪烁。随着 div 内元素数量的增加,闪烁变得更强。问题是如何消除闪烁。
此问题仅出现在 Windows 10 下的 IE11 中。在其他浏览器中该问题不会再次出现,即使在 Windows 8.1 下的 IE11 中一切正常。
我在 Windows 10 上的 IE11 版本(在 Windows 10 上的旧 IE11 中存在相同的错误)
我的测试页面aspx代码(我刚刚用这个页面创建了一个空的web项目)
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestIEFlicker.aspx.cs" Inherits="IEFlickering.TestIEFlicker" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel runat="server" ID="UpdatePanel1" UpdateMode="Conditional">
<ContentTemplate>
<div style="width: 1000px; height: 300px; background-color: antiquewhite; overflow-x: auto;">
<div style="width: 1500px; height: 200px; background-color: aquamarine;">
<asp:Button ID="Button1" runat="server" UseSubmitBehavior="true" />
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>
请帮忙,当客户升级到 Windows 10 并且他们继续使用 IE11 时,这个问题将彻底破坏我的公司应用程序......
网站的很多元素,GridView,DetailsViews等都使用了这种滚动方式,看起来很丑。
【问题讨论】:
-
你无法阻止。这是 IE 的事情。
-
这很奇怪,微软更新面板在微软浏览器中不起作用?它是错误还是功能)也许可以通过 App_Browsers 配置完成?
-
UpdatePanel 工作正常,只是在内容更新后闪烁。
-
但这不正常,这个问题出现在Windows 10 中,任何点击UpdatePanels 看起来都很难看.. 临时解决方案,我写了一条消息说浏览器不支持。这是微软想要的方式?
标签: c# asp.net webforms windows-10 internet-explorer-11