Working on ..net core 5 web site.
Model field
public string Rating { get; set; }
HTML display:
@Html.DisplayFor(modelItem => item.Rating)
I need to show the value to the user in uppercase only.
I have tried : @Html.DisplayFor(modelItem => item.Rating.ToUpper())
Which throughs an error "InvalidOperationException: Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions".
Is there an annotation I can use on the model?
How can I show the value as uppercase? Ideally not use css.