逃生与更新面板的关键问题 [英] Escape Key Issues with Update Panel

查看:129
本文介绍了逃生与更新面板的关键问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

同时击中ESC键两次当包含一个更新面板内的任何控件的页面上,说文本框或列表框即时得到一个 System.ArgumentException:无效的回发或回调参数即可。我在余下的浏览器中检查其工作正常,但在 Internet Explorer 8中其上面制造所述问题。



可能的解决方案,我发现,是使 EnableEventValidation =false的无论是在页面级或webconfig或禁用Escape键。我不想去与2前解决方案,无论是我的网站的安全性会妥协,我不希望我的退出键关闭。



感谢任何建议/意见。



代码:

 < HTML的xmlns =HTTP:// WWW。 w3.org/1999/xhtml\"> 
<头ID =头像1=服务器>
<标题>< /标题>
< /头>
<身体GT;
<表ID =form1的=服务器>
< ASP:的ScriptManager ID =ScriptManager1=服务器的EnablePartialRendering =真
的EnablePageMethods =真正的>
< / ASP:ScriptManager的>
< ASP:的UpdatePanel ID =UpdatePanelHeader=服务器的UpdateMode =条件>
<&的ContentTemplate GT;
< DIV ID =搜索>
<表样式=空细胞:隐藏;宽度=100%的cellpadding =0CELLSPACING =0类=controlsTable>
< TR>
< TD类=td4Caption>
部分文字
< / TD>
< TD类=tdpadding>
< ASP:文本框ID =txtbox的ClientIDMode =静态=服务器>< / ASP:文本框>
< / TD>
< / TR>
< TR>
< TD>
< ASP:ImageButton的SkinID =导出还有AlternateText =生成报表工具提示=生成报表
ID =ibtnGenerateReport的ValidationGroup =生成=服务器的OnClick =ibtnGenerateReport_Click />
< / TD>
< / TR>
< /表>
< / DIV>
< /&的ContentTemplate GT;
< / ASP:的UpdatePanel>
< /表及GT;
< /身体GT;
< / HTML>


解决方案

•您可以尝试的另一件事是:的EnablePartialRendering =假,以ASP:ScriptManager的



请确保您的网站通过使用适当的兼容性呈现边缘:
< META HTTP-EQUIV =X-UA-Compatible的内容=边缘/>



如果没有上述作品,请尽量控制这样的异常处理程序:



的http:/ /encosia.com/how-to-improve-aspnet-ajax-error-handling/


while hitting ESC key twice when on a page containing an update panel with a any control inside, say textbox or listbox im getting a System.ArgumentException: Invalid postback or callback argument. I have checked in remaining browsers its working fine but in Internet Explorer 8 its creating above said problem.

the possible solution i found, is making EnableEventValidation="false" either at page level or webconfig or disabling escape key. i dont want to go with 2 former solutions as either my site security will compromise and i dont want my escape key to disable.

Any Suggestions/Ideas appreciated.

Code :

<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>

解决方案

•Another thing you can try is: EnablePartialRendering="false" to asp:ScriptManager

Make sure your site is rendering with the proper compatibility by using "edge": < meta http-equiv="X-UA-Compatible" content="edge" />

If nothing above works, please try controlling the exception handler like this:

http://encosia.com/how-to-improve-aspnet-ajax-error-handling/

这篇关于逃生与更新面板的关键问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆