Click here to Skip to main content
12,950,184 members (47,251 online)
Rate this:
 
Please Sign up or sign in to vote.
See more:
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 18:26pm
Updated 19-Apr-17 18:57pm
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 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 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) 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 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 24-Sep-12 6:25am
   
Correct Ans......
using above that resolved my problem
kananjookkwww 4-Dec-12 7:34am
   
s
kananjookkwww 4-Dec-12 7:34am
   
wwww
kananjookkwww 4-Dec-12 7:34am
   
www
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  
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 6-Sep-12 10:18am
   
This question is over 2.5 years old. Please don't add more answers to old questions like this.

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

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 5,829
CHill60 3,460
Maciej Los 2,953
Jochen Arndt 1,975
ppolymorphe 1,820


Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 20 Apr 2017
Copyright © CodeProject, 1999-2017
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