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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:46:35+00:00 2026-06-14T14:46:35+00:00

I am working on a website in ASP.NET and ran into a problem. I

  • 0

I am working on a website in ASP.NET and ran into a problem. I want the website to add options to one drop down list when a new option is selected in another drop down list. To do this, I am using the second drop down list’s SelectedIndexChanged event. When I test the code by adding this line into this event:

DropDownSubject.Items.Add("TEST");

nothing happens to the first drop down list. Is it because this drop down list has the words “Unbound” written in them automatically in the editor? How can I fix this problem?

Here is the markup for the first drop down list, which I want to add items to:

<asp:DropDownList ID="DropDownClasses" runat="server" 
                >

and the second, which I am using the event with:

<asp:DropDownList ID="DropDownSubject" runat="server" 
                onselectedindexchanged="DropDownSubject_SelectedIndexChanged">
                <asp:ListItem>Mathematics</asp:ListItem>
                <asp:ListItem>Foreign Language</asp:ListItem>
                <asp:ListItem>Science</asp:ListItem>
                <asp:ListItem>Social Studies</asp:ListItem>
                <asp:ListItem>English</asp:ListItem>
            </asp:DropDownList>

All help is greatly appreciated.

  • 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-14T14:46:37+00:00Added an answer on June 14, 2026 at 2:46 pm

    Details: Sounds like you don’t have AutoPostBack set for the first drop down list. Example below

      <asp:DropDownList ID="DropDownList1" runat="server" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" 
        AutoPostBack="true">
            <asp:ListItem>Cat</asp:ListItem>
            <asp:ListItem>Dog</asp:ListItem>
      </asp:DropDownList>
    
    <asp:DropDownList ID="DropDownList2" runat="server"></asp:DropDownList>
    

    Code Behind

    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        DropDownList2.Items.Add(DropDownList1.SelectedItem.Text);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on ASP.Net 2.0 website and I have a strange problem. First
I'm working on a small website and I want to include the Asp.Net Membership
I am relatively new to website design and specifically working in ASP.NET, i am
Im working on asp.net website. In some pages I'm saving the datatable into chache
I just ran into an issue with my ASP.NET webpage. Cookies weren't working anymore.
I’m working on a website using VB (ASP.NET) I want to implement a password
I'm working on an ASP.NET website which targets desktop browsers. We want to enable
I am working on a website with Asp.Net (C#) and I have a problem
I am working a e-commerce website (in asp.net & c#) where which I want
I am working on a website in ASP.NET where e-mails can be scheduled for

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.