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

  • Home
  • SEARCH
  • 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 8137725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:14:51+00:00 2026-06-06T11:14:51+00:00

This must have an obvious solution, but I’m stumped. We are developing an application

  • 0

This must have an obvious solution, but I’m stumped. We are developing an application which is mostly XHR-based, so while we are using .aspx, very little is done with typical controls. However, in a few spots, we are just doing basic “throw this data into a spreadsheet for the user” things with a couple dropdowns for timespan for reports, etc.

The problem is when we use asp:DropDownList controls, it immediately causes any page we put them in to throw Event Validation errors on submit. I have created test pages that do not share the rest of the application’s master pages (aka, no JS at all modifying things client side) just to be sure that we don’t have some stray JS causing issues.

If I remove the DropDownList in the following example, the button click happens just fine. If I click the button with the page sitting as shown, it throws the Event Validation error.

However, other applications running on the same machine, in 4.0 Integrated app pools, do not exhibit this behavior, so I’m assuming it has something to do with the configuration. The web.config is pretty standard…tried turning httpCompression section off in a desperate attempt, but to no avail.

Does anyone have a suggestion on where to start here? Please remember… There is NO CLIENT SIDE MODIFICATION going on. This is straight from the server to the browser, then ‘click’ on the ASP-generated button.

Turning off Event Validation in the page directive does eliminate the error, but I’d rather not turn off validation if I can help it.

Environment:

  • Windows 7 Pro
  • IIS 7.5
  • .NET 4.0 Integrated app-pool
  • Error happens in IE9/Chrome/Firefox/Safari

Page:

<html>
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:DropDownList ID="ddlDays" runat="server">
            <asp:ListItem Text="30 Days" Value="30"></asp:ListItem>
            <asp:ListItem Text="60 Days" Value="60"></asp:ListItem>
            <asp:ListItem Text="90 Days" Value="90"></asp:ListItem>
        </asp:DropDownList>
        <asp:Button ID="butExport" Text="Export" runat="server" />
    </div>
    </form>
</body>
</html>

Codebehind:

protected void Page_Load(object sender, EventArgs e) {
    butExport.Click += new EventHandler(butExport_Click);
}

void butExport_Click(object sender, EventArgs e) {
    Syslog("clicked");
}

Form Data (according to Chrome Inspector):

  • __VIEWSTATE:/wEPDwULLTIwOTUzNjUzOTVkZIiv1cdholWibyWL8h5HASwxedB47NUpctCv8OQc1CWM
  • __EVENTVALIDATION:/wEWAgL0voCyDQKDgcL6CAX34hdaRiHyNiY1xLIh5Pr6aj5q8h8gGG875vMq1SXF
  • ddlDays:30
  • butExport:Export
  • 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-06-06T11:14:56+00:00Added an answer on June 6, 2026 at 11:14 am

    OK, I started going through my project looking for any possible configuration item that could be causing issues. Turns out a co-worker used a WebControlAdapter and applied it to all DropDownLists and during the Render, did not use RegisterForEventValidation.

    I don’t particularly like the adapter, but in the interest of moving on with life, I left it there and while rendering bound items, I’m calling Page.ClientScript.RegisterForEventValidation for each value. This has fixed every problematic DropDownList we have in the application.

    Thanks for the suggestions, all.

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

Sidebar

Related Questions

This must have been answered previously, but my Google powers are off today and
I'm sure this must have been asked before, but I can't find it. Can
I feel like this must have been asked before, but I've looked at Knockout
you must have seen this piece of code somewhere else too,but obviously there's no
This must be a common problem with a common solution. I have a lot
I am sure that this kind of questions must have been asked before, but
I think I must be missing something obvious, but I'm unable to find this
This question must be a repeat since it sounds obvious but I cannot seem
I'm sure this must have been covered before because I'm sure I'm not the
Is there a way to turn off this mode? I must have clicked it

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.