i have here a code that gets a portion of a record on my database and display it and has a link ("Read More") that renders the viewer to the detailed page of that record..
<% Dim id As Integer = _news.Rows(count).Item("IDnews")%>
<%=_news.Rows(count).Item("newsTitle")%>
<img src='<%= Url.Content("~/NewsPictures/" + _news.Rows(count).Item("newsThumbnail")) %>' alt="" />
<%Dim content As String = _news.Rows(count).Item("newsContent")%>
<%If content.Length > 50 Then%>
<%content = content.Substring(0, 150) & "..."%>
<%End If%>
<%=content%>
<%=Html.ActionLink("Read More", "NewsPublic", "Administration", New With {id}, DBNull.Value)%>
it displays something like : We assure you that the U... Read More
i would like that the last word be completed before it is cut. or maybe 3 sentences should be displayed before it is cut.. the last word in the above sample should be 'University'...
thank you! God bless!