Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
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.
....
 

 

pls give me a fast reply
Posted 24-Jan-10 19:26pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

ScriptManager may not find the control when binding is done in Page_Load instead bining the data to control (like dataset) in Page_PreRender will solve the issue.
  Permalink  
Comments
vedprakash289 at 10-Jun-12 10:10am
   
Thankyou Narsimlu kashagouni it solved my problem thank you very much
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Invalid call back and post back problem
 
When you are using griedview or datalist or repeater control then when you bind this control then you have to put this in if(!ispostback()){....}
 
By
  Permalink  
Comments
honey4bee at 24-Sep-12 6:25am
   
Correct Ans......
using above that resolved my problem
kananjookkwww at 4-Dec-12 7:34am
   
s
kananjookkwww at 4-Dec-12 7:34am
   
wwww
kananjookkwww at 4-Dec-12 7:34am
   
www
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Try having EnableEventValidation = false for the page you are having this issue.
 
Further, make sure your Web.Config file is up with Ajax scripts.
Also, make sure - Scriptmanagers partial rendering is enabled
  Permalink  
Comments
Ali Al Omairi(Abu AlHassan) at 17-Feb-11 4:23am
   
Sir, How about enabling event validation on control level? do you have any idea for that?
 
100 :rose: ;)
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You could do as the error message suggests and use the ClientScriptManager.RegisterForEventValidation[^] method in order to register the postback or callback data for validation.
 
Or you could just set EnableEventValidation for the page to false.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 7

Page_PreRender works .
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 8

Usually the problem resides in your Page_Load code:
If you create control in code-behind, or populate by code-behind a control defined in aspx/ascx page, you must re-create it in Page_Load (always, not only if not IsPostBack)
  Permalink  
Comments
Marcus Kramer at 6-Sep-12 10:18am
   
This question is over 2.5 years old. Please don't add more answers to old questions like this.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 9

df
  Permalink  
Comments
Wes Aday at 15-Oct-12 9:11am
   
A member for 2 months and this is the best answer you could come up with for this 2 and half year old question?
Member 9364222 at 6-Nov-12 1:54am
   
i have a gridview with a buttonfield column to edit the particular row. i have a written the row editing function.when i click on the edit button during runtime the particular row becomes textbox columns. i need to display them in textboxes in a panel not in gridview itself.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 10

in the Page_Load method just put this
if(!IsPostBack)
{
///Your Code....
}
You won't get any error like this.....
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 490
1 Maciej Los 299
2 BillWoodruff 174
3 /\jmot 170
4 Suraj Sahoo | Coding Passion 150
0 OriginalGriff 8,484
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,639
3 Maciej Los 5,159
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 17 Oct 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100