Go Back   CodingForums.com > :: Server side development > ASP.NET

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-17-2009, 10:37 AM   PM User | #1
krish.mtm143
New to the CF scene

 
Join Date: Nov 2009
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
krish.mtm143 is an unknown quantity at this point
Question Invalid postback or callback argument

hi,

Q: I have updatepanel with few textboxes and asp.net button. if i click the button inside updatepanel its working fine after this action i will try to click the button which is placed outside update panel then i getting this error.

"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."

Thanks & regards
krsh
krish.mtm143 is offline   Reply With Quote
Old 12-17-2009, 06:58 PM   PM User | #2
Mike_O
Regular Coder

 
Join Date: Apr 2009
Posts: 244
Thanks: 1
Thanked 20 Times in 20 Posts
Mike_O is an unknown quantity at this point
Hey krish.mtm143,

Have you tried to debug in the following ways:

1. Set enableEventValidation="false"
2. Put the outside button inside the UpdatePanel
3. Get rid of the UpdatePanel

What happens?

Regards,
Mike
Mike_O is offline   Reply With Quote
Old 12-19-2009, 03:43 AM   PM User | #3
krish.mtm143
New to the CF scene

 
Join Date: Nov 2009
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
krish.mtm143 is an unknown quantity at this point
Hi Mike,

thanks for ur respond..


i make it enableEventValidation="false" in my web.config. now its workinging fine if the button is outside the updatepanel also..

the actual problem is some of the guys says due to security reasons Set enableEventValidation="false" is not preferable.

Is there another way to fix this problem..

can u explain why i am getting this actual error..
krish.mtm143 is offline   Reply With Quote
Old 07-05-2012, 11:58 AM   PM User | #4
Sahana
New to the CF scene

 
Join Date: Jul 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Sahana is an unknown quantity at this point
Ans

Instead of setting EnableEventvalidation=false, Add the appropriate AsyncPostBackTrigger on the other UpdatePanel with the control being updated with the event that is doing the updating.
Sahana is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:13 PM.


Advertisement
Log in to turn off these ads.