Invalid postback or callback argument - Very Strange Error

Hello,

I have an Asp.Net 3.5 ListView.

I added a TextBox and 2 buttons in Edit Item Template.

The TextBox displays the value of the field has expected.

Buttons are defined as follows:

Dim cancel As New Button
cancel.CommandName = "Cancel"
cancel.Text = "Cancel"
Dim update As New Button
update.CommandName = "Update"
update.Text = "Update"

When I press the update or cancel button I get a strange error:

Invalid postback or callback argument.
Event validation is enabled using <pages enableEventValidation="true"/
> in configuration or <% [at] 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.

Why am I getting this error?

Thanks,

Miguel
Shapper [ Fr, 01 Februar 2008 01:31 ] [ ID #1921575 ]

Re: Invalid postback or callback argument - Very Strange Error

I recently had this error. It had something to do with having an embedded
<form> tag. Remember that, normally, ASP.NET pages are enclosed within a
<form> tag. If you end up entering another form tag, it will mess you up.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

"shapper" <mdmoura [at] gmail.com> wrote in message
news:1188149d-4275-4b92-803d-17c9e6be4611 [at] k39g2000hsf.google groups.com...
> Hello,
>
> I have an Asp.Net 3.5 ListView.
>
> I added a TextBox and 2 buttons in Edit Item Template.
>
> The TextBox displays the value of the field has expected.
>
> Buttons are defined as follows:
>
> Dim cancel As New Button
> cancel.CommandName = "Cancel"
> cancel.Text = "Cancel"
> Dim update As New Button
> update.CommandName = "Update"
> update.Text = "Update"
>
> When I press the update or cancel button I get a strange error:
>
> Invalid postback or callback argument.
> Event validation is enabled using <pages enableEventValidation="true"/
>> in configuration or <% [at] 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.
>
> Why am I getting this error?
>
> Thanks,
>
> Miguel
Jonathan Wood [ Fr, 01 Februar 2008 03:02 ] [ ID #1921582 ]
Microsoft » microsoft.public.dotnet.framework.aspnet » Invalid postback or callback argument - Very Strange Error

Vorheriges Thema: Upgraded to ASP.NET 3.5, Installed VS 2008 and now AJAX problem
Nächstes Thema: Wizard control and Google Analytics