"Invalid postback or callback argument"

Discussion in 'ASP .Net' started by Amil, Mar 16, 2006.

  1. Amil

    Amil Guest

    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
     
    Amil, Mar 16, 2006
    #1
    1. Advertising

  2. Amil

    Bruce Barker Guest

    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)

    "Amil" <> wrote in message news:...
    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
     
    Bruce Barker, Mar 16, 2006
    #2
    1. Advertising

  3. Amil

    Amil Guest

    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

    "Bruce Barker" <> wrote in message
    news:...
    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)

    "Amil" <> wrote in message
    news:...
    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
     
    Amil, Mar 16, 2006
    #3
  4. Amil

    Amil Guest

    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

    "Amil" <> wrote in message
    news:...
    > 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
    >
    > "Bruce Barker" <> wrote in message
    > news:...
    > 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)
    >
    > "Amil" <> wrote in message
    > news:...
    > 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
    >
     
    Amil, Mar 16, 2006
    #4
  5. Amil

    sam Guest

    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 ;).
     
    sam, Mar 17, 2006
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    541
  2. kevin goff
    Replies:
    2
    Views:
    1,183
    ponyryd
    Aug 4, 2006
  3. JULO
    Replies:
    1
    Views:
    6,415
    ketanbece
    Oct 29, 2008
  4. Ray Stevens

    Invalid postback or callback argument.

    Ray Stevens, Mar 28, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    9,108
    Ray Stevens
    Mar 28, 2006
  5. Mike P
    Replies:
    2
    Views:
    5,309
    Mike P
    Apr 11, 2006
Loading...

Share This Page