5

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>
Rahul Jain
  • 612
  • 1
  • 18
  • 49
  • can u consider handling the esc key on the client side? – NoviceProgrammer Jan 09 '14 at 07:23
  • @NoviceProgrammer yeah.. i need escape key for modal popup to close. so cant disable escape key. but important point its creating problem in IE8 only rest in all browsers working fine :( – Rahul Jain Jan 09 '14 at 08:31
  • Can you post your code? – Dave Mroz Jan 09 '14 at 20:09
  • @DaveMroz I have added a code for reference. – Rahul Jain Jan 10 '14 at 06:32
  • I suggest you try handling it on page load event with `try{ ... code here } catch(Exception){ ... any code handling }` if this happens only in IE8 in your case, so each time it will post back you can control what happens – Jon P Jan 10 '14 at 06:38
  • Can you post the codebehind file as well? Are there methods in there that are being used as webservices? – Dave Mroz Jan 10 '14 at 13:23
  • There are a few things that I would like to know and ask you to try also: 1. Are you getting this error while debugging or on published website.(Try publishing the site.) 2. Are you working on IE8 or simulated version of IE8 on IE9 or higher.(Check it on real IE8 browser if not already doing that.) – Shashank Chaturvedi Jan 11 '14 at 21:18

1 Answers1

1

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

Dalorzo
  • 19,834
  • 7
  • 55
  • 102
  • http://stackoverflow.com/questions/20936215/ie-8-0-escape-key-issue-web-forms/20936808#20936808 – Dalorzo Jan 12 '14 at 05:51