Create a Folder named
DisplayTemplates under
Views
->
Shared
->
DisplayTemplates
Folder
Create a view as
MyFormat.cshtml
inside DisplayTemplates Folder
write the following code in the cshtml file for custom formatting
@model string
@string.Format("{0}:",Model)
and then your razor as
@Html.DisplayFor(model => model.PropertyName,"MyFormat" )
referred from
Display For Templates[
^]