protected string EllipsisText(string text) { int numCharsToShow = 50; object attributes = null; string truncatedText = SiteUtils.TruncatedTextWithIndicator(text, numCharsToShow); string divs = SiteUtils.SurroundTextBlocksWithHtmlTags(truncatedText, "div", null, true); if (text.Length > numCharsToShow) { attributes = new { title = this.Server.HtmlEncode(text) } } ; return(SiteUtils.ContainerHtml("div", divs, attributes)); }