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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:58:59+00:00 2026-05-26T06:58:59+00:00

I have some markup like this: <form id=ddlSelections runat=server> <asp:ScriptManager ID=ScriptManager1 runat=server EnablePartialRendering=true />

  • 0

I have some markup like this:

<form id="ddlSelections" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" />

    <asp:UpdatePanel ID="UpdatePanel2" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="DDL3" EventName="SelectedIndexChanged" />
        </Triggers>
        <ContentTemplate>
            <asp:DropDownList ID="DDL3" OnSelectedIndexChanged="testFunc" runat="server" />
        </ContentTemplate>
    </asp:UpdatePanel>
</form>

<div id="placeholder"></div>

When the drop down list DDL3 changes, a callback to testFunc is performed. I want to add an additional event handler to this drop down box that will update placeholder div. For this I am trying to use jQuery. I tried this in the head tag:

$(function () {
       $("#DDL3").click(function () {
           alert("Clicked" + $("#DDL3").val());
       });
});

but jQuery is not catching these events. I am guessing this is because ASP is perhaps over-writing the event handlers.

Is there anyway to achieve this?

EDIT: What gets rendered:

<select id="DDL3" onchange="javascript:setTimeout('__doPostBack(\'DDL3\',\'\')', 0)" name="DDL3">
  • 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-26T06:58:59+00:00Added an answer on May 26, 2026 at 6:58 am

    Your “issue” is the <asp:UpdatePanel>. UpdatePanels rewrite their contents when they update, so the <select> you’re binding to probably isn’t the <select> you’re interacting with — even if they look the same.

    You can listen to Microsoft Ajax’ events — either endRequest or pageLoaded — after which you can bind as you were:

    Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(function () {
        $('#<%= DDL3.ClientID %>').click(function () {
            alert("Clicked " + $(this).val();
        });
    });
    

    Or, use jQuery’s .live or .delegate:

    $('#<%= DDL3.ClientID %>').live('click', function () {
        alert("Clicked " + $(this).val());
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some markup like this: <p><a id=1 href=#>Link 1</a></p> <p id=1show class=starthidden>Hi! I
I have a form with markup like this.... Which voucher did you cut out
I do have some strings that contains programming code, like XHTML (asp.net markup), C#,
Hay, I have some markup like this <div id=some-id> <h2><a href=#>Title</a></h2> </div> and some
I have some markup kind of like this <div class=background> <ul> <li class=tab>tab</li> <li
If I have some xml containing things like the following mediawiki markup: ...collected in
i have just noticed something strange in some asp.net markup. I have a standard
I have some trivial markup that looks like the following: <li class=someclass> <=% t'model.attr'
I'd like to have some HTML like this: <div id=div0 someAttr=0 class=shown>Some stuff</div> <div
I have some HTML markup in my ASP.NET master page representing a basic navigation

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.