我有两个来自资源文件的下拉列表。在第一个下拉列表中,我有四个选项,根据该选择,我需要根据选择填充来自唯一资源文件的第二个下拉列表。在资源文件中,我有一个包含 4 个字段(a、b、c、d)的主资源文件,然后每个选择都有 4 个不同的资源文件。谁能告诉我如何在 MVC 4 中填充它?
@Html.DropDownListFor(m => m.country, new SelectList(frontend.Resources.Country.ResourceManager.GetResourceSet(System.Globalization.CultureInfo.CurrentCulture, true, true), "Key", "Value").OrderBy(p => p.Value))
@Html.DropDownListFor(m => m.city, new SelectList(frontend.Resources.City1.ResourceManager.GetResourceSet(System.Globalization.CultureInfo.CurrentCulture, true, true), "Key", "Value").OrderBy(p => p.Value))
@Html.DropDownListFor(m => m.city, new SelectList(frontend.Resources.City2.ResourceManager.GetResourceSet(System.Globalization.CultureInfo.CurrentCulture, true, true), "Key", "Value").OrderBy(p => p.Value))
@Html.DropDownListFor(m => m.city, new SelectList(frontend.Resources.City3.ResourceManager.GetResourceSet(System.Globalization.CultureInfo.CurrentCulture, true, true), "Key", "Value").OrderBy(p => p.Value))
@Html.DropDownListFor(m => m.city, new SelectList(frontend.Resources.City.ResourceManager.GetResourceSet(System.Globalization.CultureInfo.CurrentCulture, true, true), "Key", "Value").OrderBy(p => p.Value))