I am currently working on a C# MVC web application and facing a challenge in implementing a cascading drop-down list. While I have come across various articles discussing this topic, the uniqueness of my requirements makes it difficult for me to figure out how to proceed.
The data that needs to populate the dropdown lists is stored in multiple SQL tables. The first dropdown should display information from one table (which lists available tables). Upon selecting an option, a second dropdown should be generated with data from the chosen table.
How can I create a cascading dropdown list that can pull data from different tables dynamically?
I suspect AJAX/javascript will play a key role here, but I don't have much experience with them.
To provide some context on my data structure, the application serves as a tool for administrators to maintain relevant information. There are several tables like Employees, CompaniesWorkedWith, ProjectsBeingDeveloped, BudgetItems, etc., each listed in a lookup table. The first dropdown will be populated with entries from this lookup table. When a user selects a category (e.g., Employee), the second dropdown should fetch data from the corresponding table for display. Subsequently, the user can select an item (e.g., individual employee) to view detailed information - which should be straightforward. My primary concern is enabling the dropdowns to cascade through multiple tables seamlessly, allowing easy addition of new tables to the system without any disruption.