How to Show only certain characters and bind '...' at end in mvc view in c#

  <span class="text-muted">

//here we show upto 200 characters and then '...' are shown

@(item.Content.Length > 200 ? item.Content.Substring(0, 200) + "..." : item.Content)

</span> 

Comments

Popular posts from this blog

Implement virtualisation in kendo drop down list using jquery ajax in mvc, aspx page

How to Create trigger to Update the NoofOrgs Count under each category in Category Table based on Temp Table in Sql Server

How to Preview the image and download which is in base64string format in mvc view using C#