Background
I have an ASP.net UserControl that is a simple user input form. It uses an UpdatePanel and UpdaetProgress to display a "working" gif after they click submit. We have gotten reports that the submit button sometimes doesn't do anything in FireFox, IE 8, and Safari. When looking into that, I couldn't reproduce any problems in IE, but found that in FireFox, the submit button got the following script error which was preventing the postback:
Error: Sys.WebForms.PageRequestManagerServerErrorException: Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
Source File: http://localhost:1127/ScriptResource.axd?d=ZYU-uPMJ_AcQgBrmkW_WO13JlNZSAb9cMptxJsQIH1LnA8NC31pa7PAk8l5lYCB8LDDwft7xwh7Z107MKgt7KHHBeQaeEncnAFKLJ04CaHgelsuOOv072-1ZBvMW7N_x0&t=3693a5e0
Line: 1111
Problem
To figure out what was causing the error, I gradually whittled down my code until I had almost nothing left. What I found was that when I select from a DropDownList in an UpdatePanel, the button gets this error (in FireFox only). If I remove the DropDownList, don't make a selection, or remove the UpdatePanel, the submit button posts back correctly (any 1 of those).
Example
Create an ASP.net 3.5 project and place the code below in an aspx page. Set a break point in your Page_Load or OnClick event handler in the code behind. Run it, make a selection from the DropDownList and then ClickSubmit. Notice the breakpoints are not hit.
<form id="form1" runat="server">
<div>
<asp:ScriptManager runat="server">
</asp:ScriptManager>
<div id="Div1" class="form-layout membership payment">
<asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline">
<contenttemplate>
<table cellpadding="0" cellspacing="0" border="0" class="form_table payment">
<tr>
<th align="right" valign="top">
State <span class="reqd">*</span>
</th>
<td>
<asp:DropDownList Width="75px" ID="ddlState" CssClass="txt" runat="server" AutoPostBack="false">
<asp:ListItem Value="" Text="--Select--" />
<asp:ListItem>AB
</asp:ListItem>
<asp:ListItem>AL
</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>
<div class="clear-left pad-bottom">
</div>
<asp:Label ID="lblCreditCardError" CssClass="creditCardError" runat="server">
</asp:Label>
<table cellpadding="0" cellspacing="0" border="0" class="form_table">
<tr>
<th align="right" valign="top">
</th>
<td>
<asp:HiddenField ID="HFSubmitForm" runat="server" Value="0" />
<asp:Button ID="btnTest" runat="server" OnClick="btnSubmitCC_Click" />
</td>
</tr>
</table>
</contenttemplate>
</asp:UpdatePanel>
</div>
</div>
</form>
I don't think using markup should matter anyway, but I tried adding the items to the DropDownList using binding in an if(!IsPostBack) block in the Page_Load method, but it didn't change anything.