Server Error in Application

An unhandled exception occurred during the execution of the current web request
posts - 60, comments - 75, trackbacks - 50

My Links

News

Hire Me Direct My Bookmarks

Archives

Post Categories

ASP.NET

EnableEventValidation error .NET v2.0

I had a problem today using a custom control with button. Clicking on the button  gave me the following error:

 

“Invalid postback or callback argument. 

Event validation is enabled using <pages enableEventValidation="true"/> in configuration or

<%@ Page EnableEventValidation="true" %> in a page. 

 

This verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid then ClientScriptManager.RegisterForEventValidation method to

register the postback data for validation.”

 

 I added 

<%@ Page EnableEventValidation="true" %>

 

After that i tried overriding Page.Render and adding the

 

ClientScriptManager.RegisterForEventValidation(btnSubmit.UniqueID)

 

 finally got it working by setting validation to false too 

<%@ Page EnableEventValidation="false" %>

 

hope it helps others also.


Print | posted on Thursday, September 21, 2006 10:54 AM |

Feedback

Gravatar

# re: EnableEventValidation error .NET v2.0

gnarly, dude

why not take out that pesky login page too?
3/7/2007 11:54 AM | Matthew
Gravatar

# re: EnableEventValidation error .NET v2.0

I think you don't have to use RegisterForEventValidation method if you are turning off the EnableEventValidation.
4/28/2007 3:57 AM | F. Siddiqui
Gravatar

# re: EnableEventValidation error .NET v2.0

Guys,
Just put the following line in the web.config under the system.web section and things shud be fine
<pages enableEventValidation="false" />
12/4/2007 12:50 PM | Rajeev Narang
Gravatar

# re: EnableEventValidation error .NET v2.0

i face this error. I am a newbie to all this. I have the same error but the problem is i do not know how to set it to false.. how can i do that?? thanks!!
1/9/2008 11:39 AM | nermit
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: