私のデータベース上のレコードの一部を取得して表示し、そのレコードの詳細ページにレコードを表示するコードを持っています..
<事前> <コード> <% 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)%>:
のようなものを表示します私たちはあなたにu ...もっと読む
最後の単語が切断される前に完了したことがあります、それともカットされる前に3つの文章を表示する必要があります。上記のサンプルの最後の単語は「大学」でなければなりません。