Pergunta

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

Foi útil?

Solução

Something like this?

public static MvcHtmlString SubString(this HtmlHelper helper, string theString, int length)
{
  return MvcHtmlString.Create(theString.Substring(0,length));
}
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top