ICallbackEventHandler and "Invalid postback or callback argument" error

Discussion in 'ASP .Net' started by matsla@hotmail.com, Jun 26, 2006.

  1. Guest

    Hi,

    I use the ICallbackEventHandler interface, as per "Implementing
    Client Callbacks Without Postbacks in ASP.NET Web Pages".

    When i update some dropdown controlls in the callback and then do a
    postback i get following 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. "


    I could change the page enableEventValidation="false", but then the
    page validation doesn't work.

    Any ideas how to solve this

    Thanks in advance

    // Mats
     
    , Jun 26, 2006
    #1
    1. Advertising

  2. Re: ICallbackEventHandler and "Invalid postback or callback argument"error

    You have to register the script block thru the
    RegisterForEventValidation method and before registering check for
    IsCallback.

    Then, you dont need to set enableEventValidation="false", it can be true.

    -
    Vadivel Kumar
    http://vadivelk.net
     
    Vadivel Kumar, Jun 26, 2006
    #2
    1. Advertising

  3. Guest

    Vadivel Kumar wrote:
    > You have to register the script block thru the
    > RegisterForEventValidation method and before registering check for
    > IsCallback.
    >
    > Then, you dont need to set enableEventValidation="false", it can be true.
    >
    > -
    > Vadivel Kumar
    > http://vadivelk.net



    Thanks for the advice.

    I've tried to use the RegisterForEventValidation for every control in
    the form but still get same problem. How do i use this function?

    If i use enableEventValidation="false" the post back doesn't contain
    the selected value in the dropdown box that i load with the callbak...

    Thanks

    // Mats
     
    , Jun 27, 2006
    #3
    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:
    536
  2. Martin
    Replies:
    3
    Views:
    4,202
    Martin
    Jun 15, 2006
  3. =?Utf-8?B?SWJyYWhpbS4=?=

    Invalid postback or callback argument Error

    =?Utf-8?B?SWJyYWhpbS4=?=, Jun 26, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    1,502
    bruce barker \(sqlwork.com\)
    Jun 26, 2006
  4. Nathan Sokalski

    Invalid postback or callback argument error

    Nathan Sokalski, Jan 9, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    17,411
    Cor Ligthert [MVP]
    Jan 10, 2007
  5. shapper
    Replies:
    1
    Views:
    557
    Jonathan Wood
    Feb 1, 2008
Loading...

Share This Page