0

Is it possible use a HtmlHelper to display only a few characters of the text? how can I do this?

tereško
  • 58,060
  • 25
  • 98
  • 150
Aline Bossi
  • 63
  • 1
  • 2
  • 5

1 Answers1

0

Something like this?

public static MvcHtmlString SubString(this HtmlHelper helper, string theString, int length)
{
  return MvcHtmlString.Create(theString.Substring(0,length));
}
mxmissile
  • 11,464
  • 3
  • 53
  • 79