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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:21:32+00:00 2026-06-13T21:21:32+00:00

I have a DropDownList called ddlCaseFiles. I then have a script which I import

  • 0

I have a DropDownList called “ddlCaseFiles”.
I then have a script which I import that contains the jQuery .change() function to capture the event. Then I have 3 radio buttons which sorts the dropDownList. When the default radio button is loaded, then the event fires. But as soon as I select another radio button, then the event doesn’t fire anymore.

Here is my DropDownList:

<asp:DropDownList runat="server" ID="ddlCaseFiles" DataSourceID="dsMyCaseFiles" 
DataTextField="Display" DataValueField="FileID" OnPreRender="ddl_PreRender" />

and here is my jQuery .change():

 $('#ddlCaseFiles').change(function () {
    debugger;
    $('#lblNextExhibitNumber').text('');
    var temp = $(this).val();
});

Here is a snipper of what the radio buttons do:

    protected void rbByFileName_CheckedChanged(object sender, EventArgs e)
{
    ddlCaseFiles.DataSourceID = "dsCaseFilesReverse";
    ddlCaseFiles.DataTextField = "Display";
    ddlCaseFiles.DataValueField = "FileID";
}

protected void rbByFileID_CheckedChanged(object sender, EventArgs e)
{
    ddlCaseFiles.DataSourceID = "dsCaseFiles";
    ddlCaseFiles.DataTextField = "Display";
    ddlCaseFiles.DataValueField = "FileID";
}

I have never used the .change() before. So maybe I am missing something

  • 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-13T21:21:33+00:00Added an answer on June 13, 2026 at 9:21 pm

    Looks like your CheckedChanged events of the radio buttons don’t trigger the dropdown change event. The JS change event fires when the selected value of a drop down changes. This doesn’t necessarily happen when you change the DataSourceID, does it?

    I’m not sure how to trigger this in ASP. Perhaps ddlCaseFiles.SelectedIndexChanged()?

    Otherwise, you could add a click event handler to the radios:

    $('input[type="radio"].someCssClass').click(function(){
       $('#ddlCaseFiles').trigger('change');
    });
    

    EDIT:

    This is just a guess, but it looks like the CheckedChanged might be modifying the <select> element on the page. For example, is it reinserted every time DataSourceID changes?

    Try changing your dropdown change event handler like this using the .on() function:

    $('body').on('change', '#ddlCaseFiles', function () {
        debugger;
        $('#lblNextExhibitNumber').text('');
        var temp = $(this).val();
    });
    

    Note: for better performance change $('body') to some container closer to the dropdown.

    The .change() function attaches the change handler to an element on a page. If ASP removes an element and re-adds it later then the handler is gone.

    A handler attached using the .on() function persists even if the element is removed. Read more here.

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

Sidebar

Related Questions

I have a DropDownList called (DDL) in ASP.net page, I want that DDL contains
I have a DropDownList which I initialize in a function called CreateChildControls before adding
I have an ASP.NET dropdownlist called #ddlDateRange that contains several items. Possible values in
I have a DropDownList that contains Station codes. @Html.DropDownList(Station, null, new { id =
I have a Fancybox that opens up another aspx.page which loads a DropDownList into
I have a page which contains the generated content. Page.aspx: <asp:DropDownList ID=cmbUsers runat=server AutoPostBack=True
I have a a generic control called dropdownlist.ascx that populates it's ListItems based on
I have this code as a change function on a DropDownList in Flash Builder:
I have a dropdownlist. A column called id has the control dropdownlist ( I've
i have dropdownlist of year which is coming dynamically.i have filled the dropdownlist using

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.