This worked for me:
@azzedinehtmlsql .Encode(item.Rating).ToUpper()
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Working on ..net core 5 web site.
Model field
public string Rating { get; set; }
HTML display:
@azzedinehtmlsql .DisplayFor(modelItem => item.Rating)
I need to show the value to the user in uppercase only.
I have tried : @azzedinehtmlsql .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.
This worked for me:
@azzedinehtmlsql .Encode(item.Rating).ToUpper()