I have the following inside of my view
@Html.DisplayFor(modelItem => item.FirstName)
I need to get the first initial of the First N
This will truncate at 10 characters and add "..." to the end if it is longer than 13 characters.
@if (item.Notes.Length <= 13) { @Html.DisplayFor(modelItem => item.FirstName) } else { @(item.FirstName.ToString().Substring(0, 10) + "...") }