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 6995857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:05:00+00:00 2026-05-27T20:05:00+00:00

I have a form where I dynamically populate a DropDownList using Jquery’s ajax function

  • 0

I have a form where I dynamically populate a DropDownList using Jquery’s ajax function to retrieve a list of values from a web service. I originally had a Button control which submitted the form. This caused the “exception:Invalid postback or callback argument. Event validation is enable….” error.

After researching options, such as disabling event validation (bad) and registering for event validation (which would not work in this case) the best option seemed to be to swap the Button control for a LinkButton control. I did this and, sure enough, it works fine now.

My question is…why?

What is different about the LinkButton that means that it does not cause the event validation error and have I, by changing to a LinkButton, introduced a new security risk because event validation isn’t happening?

  • 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. Editorial Team
    Editorial Team
    2026-05-27T20:05:01+00:00Added an answer on May 27, 2026 at 8:05 pm

    The postback validation error is happening because the data you send back at the postback is no the same than when it was sent by the server.

    You should take a look at this blog post by Scott K. Allen. He suggests to add all the possible values for your dropdown in the Render event for your web page.

    You could also create your own version of the DropDownList since it won’t require event validation as this guy suggests.

    My personnal take is that you might have to rethink how you interact with your data. If you need to feed dynamically your DropDownList and you use ASP.NET WebForms then you are required to have a PostBack for that. You could use a UpdatePanel to make it feel “Ajax” if you want.

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

Sidebar

Related Questions

I populate web form with dynamic list of exams from database. I want user
I have a button on a form that is dynamically spawning a select list,
i have a drop down list which is populated dynamically from database table i.e
I have jQuery creating a form dynamically and adding it to the end of
I have a form that is dynamically generated, and has dynamically generated id's (and
I have a form where controls are dynamically added to a Panel. However, when
I have a TreeView control on a form. I am dynamically adding new TreeNodes
In my view, I have a form I want to dynamically render. This form
I initially wrote code to build a form dynamically, based on data from the
I have a form in JSP. I have to populate it based on the

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.