1

I'm trying to insert on my Access BD with a GridView Footer, but when I make a submit, this give me an error

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.

I just have this on my asp form <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="tts.WebForm2" %>

and this in my GridView <asp:GridView ID="dataGridView1" horizontalalign="Center" runat="server" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None" Width="533px" BorderColor="#999966" CellSpacing="5" ShowFooter="True"> <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Center" />

[ArgumentException: 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.]
System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) +9732654
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +125
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +12
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1639

2
  • This error has nothing to do with a database insert or a GridView. Are you manipulating input controls with javascript perhaps? Commented May 11, 2017 at 12:32
  • @VDWWD no, i'm not using javascript or something like that. Just ASP.NET Commented May 11, 2017 at 12:45

1 Answer 1

1

In you aspx file you should put the first line as this:

<%@ Page EnableEventValidation="false" %>
Sign up to request clarification or add additional context in comments.

1 Comment

I've this problem too, but is in spanish the question [es.stackoverflow.com/a/68717/40111] hope you can help me

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.