"Invalid postback or callback argument"

A

Amil

I've upgraded to VS 2005. I have a page that contains no submit buttons...it merely shows some data. But, several times a day (out of thousands of hits), I get this error:

System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentException: 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.

I don't think my page does postbacks or callbacks. I know I can set EnableEventValidation="false" to most likely fix this problem, but I'm curious why I am even getting this error...only once and a while.

Comments?

Amil
 
B

Bruce Barker

this message means a page was posted with a value out of range (say for a dropdown), or by a disabled or invisible control.

note: even without a submit button, if the user hits return, the form will be posted.

-- bruce (sqlwork.com)

I've upgraded to VS 2005. I have a page that contains no submit buttons...it merely shows some data. But, several times a day (out of thousands of hits), I get this error:

System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentException: 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.

I don't think my page does postbacks or callbacks. I know I can set EnableEventValidation="false" to most likely fix this problem, but I'm curious why I am even getting this error...only once and a while.

Comments?

Amil
 
A

Amil

Hum...I'll have to try and hit Enter. The page does contain a Form
control...but the only other content is some images.

Amil

this message means a page was posted with a value out of range (say for a
dropdown), or by a disabled or invisible control.

note: even without a submit button, if the user hits return, the form will
be posted.

-- bruce (sqlwork.com)

I've upgraded to VS 2005. I have a page that contains no submit
buttons...it merely shows some data. But, several times a day (out of
thousands of hits), I get this error:

System.Web.HttpUnhandledException: Exception of type
'System.Web.HttpUnhandledException' was thrown. --->
System.ArgumentException: 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.

I don't think my page does postbacks or callbacks. I know I can set
EnableEventValidation="false" to most likely fix this problem, but I'm
curious why I am even getting this error...only once and a while.

Comments?

Amil
 
A

Amil

I press Enter in both IE and FF and the page is not resubmitted. So, I
don't know how the page is being resubmitted. Maybe a search engine or
something??

Amil
 
S

sam

Im not really sure about this, but if you get a viewstate decoder you
will notice that all the client ids of postback controls are stored in
one of the first 3 triplets in the viewstate. It sounds like what may
be happening is the EVENTTARGET is not found as one of these ids, thus
triggering this exception.

I can only speculate, MS does not document this. I think that a call
to RegisterRequiresPostback() may put the id for the control in the
viewstate as explained above.

So, in summary I don't know what is causing your problem ;).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,149
Members
46,695
Latest member
StanleyDri

Latest Threads

Top