I have started to use MVC recently. I would like to have two nested drop-down lists that would get their information from a file (csv file for example. The first drop-down list would be for provinces. The 2nd drop-down list would be for some cities in the selected province above. so the values in the second drop-down list will change based on the first selection.
and the code will then extract some information for that specific city. So each row in my data table looks like this:
|province|city|some information for that city
my first question is: what would be the best way to incorporate that data. Do you recommend CSV? should use some sort of dictionary file?
2nd question is how to populate from that data file? Should I introduce a dictionary variable and populate it from the data file and then use it for the drop-down list?
Apologies if this is too basic.