Error after replace gridview

Discussion in 'ASP .Net' started by David C, Oct 5, 2009.

  1. David C

    David C Guest

    I replaced a GridView with a DataList so I could get multiple columns and
    now I am getting the 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.

    The other thing I noticed is that when I double-clicked a Button control in
    the DataList to get the click event code, it did not add the Handles... at
    the end of the top line of the Sub. Any ideas why this is occurring?
    Thanks.

    David
     
    David C, Oct 5, 2009
    #1
    1. Advertising

  2. On Oct 6, 12:01 am, "David C" <> wrote:
    > I replaced a GridView with a DataList so I could get multiple columns and
    > now I am getting the 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.
    >
    > The other thing I noticed is that when I double-clicked a Button control in
    > the DataList to get the click event code, it did not add the Handles... at
    > the end of the top line of the Sub.  Any ideas why this is occurring?
    > Thanks.
    >
    > David


    Do you have any client script on this page?
     
    Alexey Smirnov, Oct 5, 2009
    #2
    1. Advertising

  3. David C

    David C Guest

    "Alexey Smirnov" <> wrote in message
    news:...
    On Oct 6, 12:01 am, "David C" <> wrote:
    > I replaced a GridView with a DataList so I could get multiple columns and
    > now I am getting the 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.
    >
    > The other thing I noticed is that when I double-clicked a Button control
    > in
    > the DataList to get the click event code, it did not add the Handles... at
    > the end of the top line of the Sub. Any ideas why this is occurring?
    > Thanks.
    >
    > David


    Do you have any client script on this page?

    Yes, but I did before I added the DataList and got no error.

    David
     
    David C, Oct 6, 2009
    #3
  4. David C

    David C Guest

    "Mark Rae [MVP]" <> wrote in message
    news:...
    > "David C" <> wrote in message
    > news:...
    >
    >> I replaced a GridView with a DataList so I could get multiple columns

    >
    > I must be missing something, because that statement makes no sense at
    > all...
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net


    I meant multiple items accross the page.

    Button1 Button2 Button3
    Button4 Button5 etc

    David
     
    David C, Oct 6, 2009
    #4
  5. On Oct 6, 1:43 am, "David C" <> wrote:
    > "Alexey Smirnov" <> wrote in message
    >
    > news:...
    > On Oct 6, 12:01 am, "David C" <> wrote:
    >
    >
    >
    >
    >
    > > I replaced a GridView with a DataList so I could get multiple columns and
    > > now I am getting the 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.

    >
    > > The other thing I noticed is that when I double-clicked a Button control
    > > in
    > > the DataList to get the click event code, it did not add the Handles... at
    > > the end of the top line of the Sub. Any ideas why this is occurring?
    > > Thanks.

    >
    > > David

    >
    > Do you have any client script on this page?
    >
    > Yes, but I did before I added the DataList and got no error.
    >
    > David- Hide quoted text -
    >
    > - Show quoted text -


    If you google you see, this is very common issue

    http://www.google.com/search?hl=en&...lidation is enabled using&aq=f&oq=&aqi=g5g-m2

    Maybe this is something similar to the following topic

    http://telligent.com/communities/te...rner_archive_read_only_1/f/159/t/1016293.aspx

    Try to disable scripts and see what happens. If it helps, check what
    scripts do on the page.
     
    Alexey Smirnov, Oct 6, 2009
    #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. Brian Blais
    Replies:
    1
    Views:
    412
    Bruno Desthuilliers
    Jun 27, 2006
  2. Greg Ewing
    Replies:
    2
    Views:
    377
    Dieter Maurer
    Jun 29, 2006
  3. =?Utf-8?B?RnJhbmNlc2Nv?=

    Server Error After a DLL Replace

    =?Utf-8?B?RnJhbmNlc2Nv?=, Oct 17, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    273
    =?Utf-8?B?RnJhbmNlc2Nv?=
    Oct 17, 2006
  4. Alun
    Replies:
    3
    Views:
    4,663
    Masudur
    Feb 18, 2008
  5. Prasad S
    Replies:
    2
    Views:
    260
    Dr John Stockton
    Aug 27, 2004
Loading...

Share This Page