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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:34:17+00:00 2026-06-11T11:34:17+00:00

I am sorry if this question seems basic, but I am at a loss.

  • 0

I am sorry if this question seems basic, but I am at a loss. I am new to programming but have enough knowledge to get myself lost. Basically, I have a dropdown list and a repeater list. How do to get the list to change when then categories dropdownd is changed. This is in C#.

Here is the code for the dropdown:

protected void PopulateCategories()
{
    category myCategory = new category();
    category[] myCategoryList = myCategory.Listing("title ASC");

    ddlCategories.Items.Add("-- Select a category --");
    ddlCategories.Items.Add("View all categories");

    foreach (category category in myCategoryList)
    {
        ListItem item = new ListItem(category.title, category.category_id);
        ddlCategories.Items.Add(item);
    }
}

If you need more info please ask. I am new to this and would appreciate any help I can get. Thanks in advance!

  • 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-11T11:34:18+00:00Added an answer on June 11, 2026 at 11:34 am

    You have a couple of options here:

    On the dropdownlist control you can add a OnSelectedIndexChanged handler which can update the repeater by databinding a new list to it.

    This is easier to do but requires a postback and therefore is not as slick on the client side.

    The other way is to handle this in javascript by attaching an event handler to the dropdown list which then updates list. This will be a better experience for the user but will require a bit more effort to either put all the data on the page for all categories or request them as the dropdown changes.

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

Sidebar

Related Questions

Sorry for this crazy question but it seems to be odd! I have a
I'm new with cakephp .. sorry, if my question seems basic.. I have models:
sorry i know this is a basic question, but i have been trying for
Sorry if this question seems stupid, but it's stumped me for a couple days,
Sorry if this question seems a bit complex but I think its all related
Sorry if this question is a bit open ended, but I'm pretty new to
I am new to Haskell, sorry if this is a basic question. I currently
I know this may be a very basic question, sorry if it is but
Okay; sorry I know this isn't a programming question as such, but it was
I'm a beginner so sorry if my question seems basic. I've looked online but

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.