Natasha Thapa Natasha Thapa - 8 days ago 7
C# Question

MVC LabelFor to replace underscores with CamelCase

my DB model has the column name with "_" in the field name.
is there a way to dislay these values in Camel Case when displaying in the form? like
"BusinessName"

i am using asp.net MVC3 with Razor

@Html.LabelFor(model => model.business_name)

Answer

Could you not just use the DisplayAttribute?