我有一个博客,想获得帖子标题的简短文本
例如("This is original post title")
("This is orig....")
我的视图助手:
@helper Render(Post post,
System.Web.Mvc.HtmlHelper html,
bool isAdmin, bool showComments)
{
<div class="postTitle"> <a href="@Href("~/Posts/Details/" + post.ID)">
<h1>@post.Title.Take(34)</h1></a><br /><br />
</div>
但我得到System.Linq.Enumerable+<TakeIterator>d__3a``1[System.Char]
了冠军的位置。