I don't understand why this happens. I added the following code into my ASP.NET project and it worked just fine several days ago. I then continued on working on the page until today I tried clicking the "Verify" button from the code below and here's what happens:
First this is the asp.net code:
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:TextBox ID="TextVerifyName" runat="server" CssClass="input1" EnableViewState="false"></asp:TextBox>
<asp:Button ID="ButtonVerifyName" runat="server" Text="Verify" CssClass="checkButton" onclick="ButtonVerifyName_Click" />
<asp:UpdateProgress ID="UpdateProgressVerifyName" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
<ProgressTemplate>
<img src="Graphics/spinner.gif" alt="Please wait" />
</ProgressTemplate>
</asp:UpdateProgress>
</ContentTemplate>
</asp:UpdatePanel>
- The first time I click the "Verify" button the code works fine.
- The second time I run it I get the following error:
Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Invalid postback or callback argument. Event validation is enabled using 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.
Can someone explain why is this happening because the error message above is nothing more than 100% confusing???
I haven't done anything with ClientScriptManager.RegisterForEventValidation method.