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>
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.
Try putting any function/binding you have specified in the page_load event inside
if(!IsPostback)
{
}
It may help.
Indeed, I was loading data in the Page_Load method but what was weird was that when you click on a grid that had a leaping commandColumn runtime error javascript.
The solution was the
(! IsPostBack)
{
/ / loadData
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With