0

Assuming we have some string extension method that splits camel casing (as one might use for presentation of an enum), is there any way that this can be applied to the asp-items attribute on a select list as per

<select asp-items="Html.GetEnumSelectList<Enum>()">
    ...    </select>

Or do we just have to generate a new SelectList() in the ViewModel to achieve this?

Mikustykus
  • 300
  • 7
  • 16
  • 1
    Is [this](https://stackoverflow.com/questions/40052794/html-getenumselectlist-getting-enum-values-with-spaces) any use? – Rawling Feb 27 '20 at 08:39
  • 1
    Ah, actually it is (not sure why it wasn't suggested when I posted). I suppose the question still stands as to whether there is any scope for manipulation with this method, especially if one doesn't really want data annotations on their enums. – Mikustykus Feb 27 '20 at 09:39

0 Answers0