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

Top MNC Interview Questions- Full Stack Developer

Interview Questions-2

How to get the user details, user current level, next level, Rank in sql server