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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:11:44+00:00 2026-05-26T08:11:44+00:00

I want to load data in second <select> tag (in ASP.NET) when I select

  • 0

I want to load data in second <select> tag (in ASP.NET) when I select an item from first <select> tag.

I have :

<table cellpadding="2" border="0">
<tr><td>Categories : <br /><select id="list_cat_for_list" runat="server" onchange="get_list" ></select><br />
<select id="list_got_links" runat="server"></select>
</td><td><asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="list_cat_for_list" ValidationGroup="del_cat" Display="Static" runat="server" ErrorMessage="select category"></asp:RequiredFieldValidator></td></tr>
<asp:Button runat="server" ID="Button1" OnClick="delete_category_function" Text="Delete category" ValidationGroup="del_cat" />
</table>

And the code behind :

 protected void get_list( object sender, EventArgs e ) {
     BusinessLayerArcht layer = LoadDataFromBL();
     foreach ( CategoriesCtrlDto cto in layer.Categories ) {
        if ( cto.Name == list_cat_for_list.Value ) {
           foreach ( LinksCtrlDto lk in cto.Links ) {
              list_got_links.Items.Add( lk.Url );
           }
        }
     }
  }

When I change option, IE returns that get_list is undefined.

I don’t know what arguments I have to pass to C# function.
I know that onClick has object sender, EventArgs e…

Where is my mistake ?

  • 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-26T08:11:45+00:00Added an answer on May 26, 2026 at 8:11 am

    You can use the ASP Drop down list to perform this aciton on the server side.

    <asp:dropdown id = "id" runat="server" selectedIndexChanged="get_list"><asp:dropdownlist>
    

    If you need to access the client side version of the control in javascript you can utilize the browser’s “view source” feature to get the ASP generated ID for the control and use that for referencing in any javascript.

    If you wish to use AJAX there’s an extender in the AJAX Control Toolkit which allows you to perform the cascading drop down feature with multiple dropdowns asynchronously so you won’t have the complete postbacks going on while the user is interacting with the page.

    You can download the toolkit for free from Here

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

Sidebar

Related Questions

I want to load some data from mysql into my cocoa application view before
I want to load the data into session so that when the next button
I want to load 52 images (deck of cards) in gif format from my
I want to load some images into my application from the file system. There's
I have an XML that I want to load to objects, manipulate those objects
If all tables I want to delete from have the column gamer_id can i
I have a button which when pressed makes calls that load information from a
I want to load one or more DLLs dynamically so that they run with
I want to load a desktop application, via reflection, as a Control inside another
I am building a blog type page, and I want to load items into

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.