質問

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

役に立ちましたか?

解決

Something like this?

public static MvcHtmlString SubString(this HtmlHelper helper, string theString, int length)
{
  return MvcHtmlString.Create(theString.Substring(0,length));
}
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top