I'm getting this too. The page has a couple of javascript functions in the header. I am not sure if putting the script there is causing this.
The error happens on the postback due to the submit button. I have not found any problems with the html so far.
I also have tried moving everything in if not postback and still get it. Disabling event validation does help but not sure if that is desired. Since it's a intranet app, this may be ok.
I meet this error too! I have two dropdownlists and 1 gridview! Two dropdownlists act as the filter! Everything ok BEFORE i get the values of two droplist and Bind data base on those criterials! Anyone has the solution for that?
I moved my code to change view databind from Page_Load to the procedure that handle the event SelectedIndexChanged so everything works well! Hope this may help others that come up with this error can solve their problem! [:)]
as is said on some of the previous posts, one common reason for this is that you databind GridView etc in Page_Load without Not Page.IsPostBack | !Page.IsPostBack check.
Reason is that postback data validation happens at postback event raise stage ;the 2nd time occurring just after Page_Load, (for example Button checks in RaisePostBackEvent method, when it calls ValidateEvent method), and when you redatabind in Page_Load
you recreate the controls. And what's important,you recreate them before event validation occurs, and this has the impact that event validation thinks data originated from different control than the one it has in hands. And that's exactly what event validation
is designed to check for.
When you don't redatabind, it is "known" that the control is the source of that specific piece of data (postback argument etc etc). I suppose it is basically just comparing some sort of hash value.
I was getting this error :Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/>
on my 2.0 app that was upgraded from 1.1. I am not using AJAX and I was wondering how I am getting callback error!
Anyways I think some how ___EventValidation hidden field variable has not been loaded in the browser page when i programmatically hide few of my controls but when disable them instead of hide them it works fine. This works in 1.1 when i hide but not in
2.0. So some thing is changed in 2.0 and I am sure the change is for good.
I m getting similar error messag w/ Firefox , its just a simple user control, that has a linkbutton , it is redirecting to login page when clicked, when you click on it is giving the exception below, I don't get it all the times, once in a while, I never
get it w/ IE
Heelp please I love Firefox
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.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: 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.
fsteveb
Member
25 Points
13 Posts
Re: error: enableEventValidation="true"/
Jan 18, 2007 03:18 PM|LINK
I'm getting this too. The page has a couple of javascript functions in the header. I am not sure if putting the script there is causing this.
The error happens on the postback due to the submit button. I have not found any problems with the html so far.
I also have tried moving everything in if not postback and still get it. Disabling event validation does help but not sure if that is desired. Since it's a intranet app, this may be ok.
Steve
vuanhviet
Member
15 Points
22 Posts
error
Feb 18, 2007 07:47 AM|LINK
vuanhviet
Member
15 Points
22 Posts
My problem solved!
Feb 18, 2007 08:07 AM|LINK
joteke
All-Star
46284 Points
6896 Posts
ASPInsiders
MVP
Re: My problem solved!
Feb 18, 2007 08:40 AM|LINK
Yup,
as is said on some of the previous posts, one common reason for this is that you databind GridView etc in Page_Load without Not Page.IsPostBack | !Page.IsPostBack check.
Reason is that postback data validation happens at postback event raise stage ;the 2nd time occurring just after Page_Load, (for example Button checks in RaisePostBackEvent method, when it calls ValidateEvent method), and when you redatabind in Page_Load you recreate the controls. And what's important,you recreate them before event validation occurs, and this has the impact that event validation thinks data originated from different control than the one it has in hands. And that's exactly what event validation is designed to check for.
When you don't redatabind, it is "known" that the control is the source of that specific piece of data (postback argument etc etc). I suppose it is basically just comparing some sort of hash value.
Teemu Keiski
Finland, EU
kulkarn8
Member
31 Points
15 Posts
Re: error: enableEventValidation="true"/
Feb 20, 2007 05:58 PM|LINK
I was getting this error :Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/>
on my 2.0 app that was upgraded from 1.1. I am not using AJAX and I was wondering how I am getting callback error!
Anyways I think some how ___EventValidation hidden field variable has not been loaded in the browser page when i programmatically hide few of my controls but when disable them instead of hide them it works fine. This works in 1.1 when i hide but not in 2.0. So some thing is changed in 2.0 and I am sure the change is for good.
Hope this helps
Invalid postback or callback argument.
kulkarn8
Member
31 Points
15 Posts
Re: error: enableEventValidation="true"/
Feb 20, 2007 06:05 PM|LINK
I was getting this erro:
Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/>
I fixed my problem with thisInvalid postback or callback argument.
lordofthexin...
Member
16 Points
24 Posts
Re: error: enableEventValidation="true"/
Feb 22, 2007 10:23 AM|LINK
I m getting similar error messag w/ Firefox , its just a simple user control, that has a linkbutton , it is redirecting to login page when clicked, when you click on it is giving the exception below, I don't get it all the times, once in a while, I never get it w/ IE
Heelp please I love Firefox
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.Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: 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.
vainternet
Member
32 Points
12 Posts
Re: error: enableEventValidation="true"/
Feb 28, 2007 01:40 PM|LINK
EnableEventValidation
Hiba84
Member
343 Points
129 Posts
Is there a solution?
Mar 07, 2007 06:50 AM|LINK
Hey,
So is there a solution not to get this error if i want to databind my datatable to the gridview when the page postback?
thx
Hiba
mdc124
Member
2 Points
1 Post
One Cause...
Mar 12, 2007 10:36 AM|LINK
I found that due to a cut and paste error this issue can be due to having an extra <form id="xxx" runat="server"> on the page.
Hope that helps someone somewhere
ap16 Limited
www.ap16.com