I have a combo box in my program that has got onchange method too.when I choose some of it's attributes I recieve 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.
what should I do? and what is this error for?
What it is you exactly are doing? Setting EnableEventValidation="False" probably overcomes the issue but it is security feature so that disabling it should be considered carefully.
I did your recommandation and my program works properly ,but security is very important for me. do you have any suggestion for me that not to decrease security?is there another solution for this problem?
Do you have something like <Choose One> in your combo box?
ASP.NET will detect the <> and think that it is a possible script injection attack.
Try changing any such inputs to Please choose... or something like that (i.e. remove the <>'s). If it's mandatory input, put a required field validator on the page as well and set it's InitialValue property to match the prompt value (i.e. Please choose...),
to stop (on most browsers) the postback until the user has selected a value.
thanks for your suggestion,but I don't have any <>'s in my combobox items.I have two comboboxes that with selecting one item in first one the items in second one, change.this is the addres for my website:
http://www.e-charts.com/charts/chartmaker.aspx?sym=IBM&sty=1
the first combobox is period and the second one is frequency and with selecting items from these two comboboxes and submitting them I got this error.
I want to know if you have any suggestion for solving my problem.thanks
Did anyone ever solve this - - - I have the same issue - - - my error occurs whenever a 'button' is pressed (like the Edit Button on the GridView) -but- I have found that IF I prevent all of the Page Errors on the Insert Item Template (first ie: fill in the
blanks on Required Fields) THEN the Edit, etc. works fine - IF I don't fill in the blanks (even though I am doing an Edit function) then I get the Abort???
Thanks,
Paul
I have got the same error. I have a gridview on a collapsible panel. In the view, I did a click anywhere to select a row implementation. When I click the row, I got the exception.
After I set the EnableEventValidation = false. The problem went away. But this is not an ideal way to fix it. What is a good way?
I have a similar validation error in which the the input data were "corrupt" -- a couple of the database entries had newlines (carriage returns, whatever) at the end, and the option tags showed up like this:
<option value="some value here
">Some Text Here</option>
rather than
<option value="some value here">Some Text Here</option>
as you'd expect. Worse, it was only a couple of entries, so it seemed random to the user. Check your page source. I ended up just re-entering the values in the database, making sure I nulled them out first (which you can do with Ctrl-Zero in SQL Server Enterprise
Manager (2000) or Management Studio (2005)).
I received this error whilst debugging.
Vis Studio had crashed while I was testing my web project.
continuing with testing produced the error when I tried to click a button and validate a number or radiobuttons.
This is the only time I have encountered the error.
hsharifi
Member
50 Points
10 Posts
error: enableEventValidation="true"/
Mar 19, 2006 04:31 AM|LINK
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.
what should I do? and what is this error for?
joteke
All-Star
46284 Points
6896 Posts
ASPInsiders
MVP
Re: error: enableEventValidation="true"/
Mar 19, 2006 07:00 AM|LINK
Teemu Keiski
Finland, EU
hsharifi
Member
50 Points
10 Posts
Re: error: enableEventValidation="true"/
Apr 03, 2006 07:39 AM|LINK
thanks for your replying.
I did your recommandation and my program works properly ,but security is very important for me. do you have any suggestion for me that not to decrease security?is there another solution for this problem?
DMW
All-Star
15943 Points
2353 Posts
Re: error: enableEventValidation="true"/
Apr 03, 2006 07:44 AM|LINK
Do you have something like <Choose One> in your combo box?
ASP.NET will detect the <> and think that it is a possible script injection attack.
Try changing any such inputs to Please choose... or something like that (i.e. remove the <>'s). If it's mandatory input, put a required field validator on the page as well and set it's InitialValue property to match the prompt value (i.e. Please choose...), to stop (on most browsers) the postback until the user has selected a value.
Dave
hsharifi
Member
50 Points
10 Posts
Re: error: enableEventValidation="true"/
Apr 03, 2006 08:12 AM|LINK
thanks for your suggestion,but I don't have any <>'s in my combobox items.I have two comboboxes that with selecting one item in first one the items in second one, change.this is the addres for my website: http://www.e-charts.com/charts/chartmaker.aspx?sym=IBM&sty=1
the first combobox is period and the second one is frequency and with selecting items from these two comboboxes and submitting them I got this error.
I want to know if you have any suggestion for solving my problem.thanks
Paul44
Member
131 Points
50 Posts
Re: error: enableEventValidation="true"/
May 29, 2006 05:18 PM|LINK
Thanks,
Paul
khushal999p
Member
40 Points
8 Posts
Re: error: enableEventValidation="true"/
Jun 10, 2006 11:45 AM|LINK
Man does any one solve it.....i have the same problem ...i have button in Repeatercontrol
:((
allenh06
Member
5 Points
1 Post
Re: error: enableEventValidation="true"/
Jun 24, 2006 07:18 PM|LINK
I have got the same error. I have a gridview on a collapsible panel. In the view, I did a click anywhere to select a row implementation. When I click the row, I got the exception.
After I set the EnableEventValidation = false. The problem went away. But this is not an ideal way to fix it. What is a good way?
JBL
Member
5 Points
1 Post
Re: error: enableEventValidation="true"/
Jun 29, 2006 02:48 PM|LINK
<option value="some value here
">Some Text Here</option>
rather than
<option value="some value here">Some Text Here</option>
as you'd expect. Worse, it was only a couple of entries, so it seemed random to the user. Check your page source. I ended up just re-entering the values in the database, making sure I nulled them out first (which you can do with Ctrl-Zero in SQL Server Enterprise Manager (2000) or Management Studio (2005)).
Hope this helps.
JBL
oblongmouth
Member
39 Points
8 Posts
Re: error: enableEventValidation="true"/
Jul 05, 2006 10:51 AM|LINK
Vis Studio had crashed while I was testing my web project.
continuing with testing produced the error when I tried to click a button and validate a number or radiobuttons.
This is the only time I have encountered the error.