Rah*_*ain 5 c# asp.net asp.net-4.0 internet-explorer-8
当在包含内部任何控件的更新面板的页面上按两次ESC键时,说文本框或列表框我得到一个System.ArgumentException:无效的回发或回调参数.我已经检查了其余浏览器的工作正常,但在Internet Explorer 8中它创建了上述问题.
我找到的可能的解决方案是在页面级别或webconfig上调用EnableEventValidation ="false"或禁用转义键.我不想使用2个以前的解决方案,因为我的网站安全性会妥协,我不希望我的转义键禁用.
任何建议/想法赞赏.
代码:
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"
EnablePageMethods="true">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanelHeader" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="Search">
<table style="empty-cells: hide;" width="100%" cellpadding="0" cellspacing="0" class="controlsTable">
<tr>
<td class="td4Caption">
Some Text
</td>
<td class="tdpadding">
<asp:TextBox ID="txtbox" ClientIDMode="Static" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:ImageButton SkinID="Export" AlternateText="Generate Report" ToolTip="Generate Report"
ID="ibtnGenerateReport" ValidationGroup="Generate" runat="server" OnClick="ibtnGenerateReport_Click" />
</td>
</tr>
</table>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
\xe2\x80\xa2您可以尝试的另一件事是: EnablePartialRendering="false" to asp:ScriptManager
\n\n使用“edge”确保您的网站以适当的兼容性进行渲染:\n<meta http-equiv="X-UA-Compatible" content="edge" />
\n\n如果以上不起作用,请尝试像这样控制异常处理程序:
\n\nhttp://encosia.com/how-to-improve-aspnet-ajax-error-handling/
\n