I'm displaying some content using the following bit of code:
<% foreach ( var m in ViewData.Model) { %>
<div class="content">
<%= m.article %>
</div>
Which shows a news article from my database. What I want to do is truncate the story to be smaller, how do would I do this? Also the article column contains HTML tags such as <p>
so therefore splitting up the article purely on character numbers would cause issues.
Any ideas on where to start? I'm new to MVC.
Thanks