I have the following dropdown list in my view: @Html.DropDownListFor(m => m.Data.StaffSelected, new SelectList(Model.Data.AllPrograms, "ProgramName", "ProgramName"), "- Please Select -", new { @class = "browser-default" })
@Html.DropDownListFor(m => m.Data.StaffSelected, new SelectList(Model.Data.AllPrograms, "ProgramName", "ProgramName"), "- Please Select -", new { @class = "browser-default" })
It works fine except that the ProgramName field of my AllPrograms list provided by my custom table, is based on a localizable text box and looks like {$Program.Program_2$} or {$Program.Program_1$} to match corresponding resource strings.
{$Program.Program_2$} or {$Program.Program_1$}
how can I change the code of my dropdown to display the correct name of the program?
Thanks S.
You're localizing content on your site so you need to check out this documentation. I'm not strong in MVC yet but this should get you going in the right direction.
Please, sign in to be able to submit a new answer.