Dropdownlist and localized string

Sylvain C. asked on June 4, 2019 21:18

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" })

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.

how can I change the code of my dropdown to display the correct name of the program?

Thanks S.

Recent Answers


Brenden Kehren answered on June 5, 2019 15:37 (last edited on June 5, 2019 15:38)

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.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.