Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 159033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:47:14+00:00 2026-05-11T10:47:14+00:00

This question seems to have been asked before, but I feel like my situation

  • 0

This question seems to have been asked before, but I feel like my situation is slightly different.

I have a page that contains a gridview. When a button is pressed to edit one of the records in the gridview, the button first executes some client script that pops up a modal window for the purposes of editing (set using .onClientClick). From this pop-up, the user hits Update which updates the database and closes the window. Once the window is closed, the button’s server-side code is supposed to fire, which will call the function to refresh the gridview. Instead, I get the error message:

Invalid postback or callback argument. Event validation is enabled using in configuration or 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.

What really irks me is that I use this exact same logic on a different page and it works fine.

Any suggestions as to how I could avoid this?

UPDATE: I have removed the line of code that added the client-side script, and I still get the error. So I’m fairly positive it is being caused simply by the postback. Upon closer inspection I realize that there are in fact some ListItems being programatically bound to DropDownLists. So… I probably need to do the ClientScriptManager.RegisterForEventValidation thing…. Could someone possibly give me an example on what the syntax for doing that would look like? Seems to be set up differently than the ScriptManager object….

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T10:47:14+00:00Added an answer on May 11, 2026 at 10:47 am

    If your button is created in the code-behind (for example, your RowDataBound event creates a new instance of Button and adds it to a cell) then you will need to recreate those controls (with the same IDs) before the Control Events stage of the page life-cycle. Recreating the buttons in the Load event should work fine.

    If your controls are created and you’ve attached handlers to their events then the most probable cause of this error is javascript which modifies your DOM/form.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Variations of this question have been asked before, but it seems like the issue
Firstly, this seems like something that should have been asked before, but I cannot
I feel like this question has been asked before but the answers seem pretty
I am aware that this question has been asked before, but I have tried
It seemed like this question should have been asked before, but searching found nothing.
This is a question that has been asked before, but unfortunately no solution seems
This question has been asked before but in a slightly different way and I
This question seems to have been asked many times before, but I didn't see
I'm aware that variants of this question have been asked before, but I do
This question seems to have been asked a lot, but I haven't seen an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.