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

  • Home
  • SEARCH
  • 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 4008186
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:43:24+00:00 2026-05-20T08:43:24+00:00

I need to approach a cascading dropdownlist in asp.net mvc using one single table.

  • 0

I need to approach a cascading dropdownlist in asp.net mvc using one single table. I downloaded maxmind.com worldcities where the database scheme displays the following fields:

  • Country Code
  • ASCII City Name
  • City Name
  • State/Region
  • Population
  • Latitude
  • Longitude

I would like to know what do I have to develop in order to create a cascading dropdown where in the first dropdown displays country data and in the second one displays State data associated to the selected country.

Example or tutorial link will be highly appreciated. brgds!

  • 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-20T08:43:25+00:00Added an answer on May 20, 2026 at 8:43 am

    You have to use some grouping…

    you could use following

    dim query = from i in mydata group by i.country into regions = Group select country, regions
    

    This gives you the basic. Is linq, if you know what i mean.

    No you assign the frist dropdown with the query and use just the “country” keyword. After a user selects a country, use ajax or the usual postback to request an update for the second dropdown. there you will do following

    query is still the object holding your grouped query by country…

    so…

    dim states = (from i in query where i.country = "myselectedCountry" select i.regions).single()
    

    now you have all the regions in one query, you can now bind it to a dropdown.

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

Sidebar

Related Questions

need ask you about some help. I have web app running in Net 2.0.
I asked a question earlier today, but I think I need to approach it
I'm writing a program (for Mac OS X, using Objective-C) and I need to
I am using a small java smtp library ( http://code.google.com/p/subethasmtp/ ), by this I
I need a working approach of getting all classes that are inherited from a
In my ASP.NET web-application I use NHibernate to persist my User-Instances, where each of
Which approach is more preferrable when changing just a single value in model? Aesthetically-speaking
Need a function that takes a character as a parameter and returns true if
Need a way to allow sorting except for last item with in a list.
Need to an expression that returns only things with an I followed by either

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.