0
@model SocialReader.BackOffice.Models.NewsAndCategories
@using MvcContrib.UI.Grid;
@using MvcContrib.UI.Pager;
@using MvcContrib.Pagination;
@using System.Linq;
@using SocialReader.BackOffice.Common;
@{
ViewBag.Title = "News";
}
<h2>@ViewBag.Message</h2>
<p>
@Html.ActionLink("Create News", "Create", "News")
</p>
@{Html.RenderPartial("Pager", Model.PagedViewModel.PagedList);}
@Html.Grid(Model.PagedViewModel.PagedList).Columns(column =>
{
column.For(x => Html.ActionQueryLink(x.Title, "View", new { id = x.Id })).Named("Title").InsertAt(0);
column.For(x => x.Category.Name).Named("Category").InsertAt(1);
column.For(x => x.DateUpdated).Named("Date Updated").InsertAt(2);
column.For(x => x.Published).Named("Is Published").InsertAt(3);
column.For(x => x.ViewCount).Named("View Count").InsertAt(4);
column.For(x => x.UserCreated).Named("Authoer").InsertAt(5);
}).Sort(Model.PagedViewModel.GridSortOptions).Attributes(@class => "grid-style")
我有這樣的代碼,我米試圖進行分頁,你點擊下一頁等方面的新聞,但分頁未呈現,我米看到,普通的HTML頁面上,而不是呈現的HTML 。MVC3與MVCcontrib不渲染/生產HTML
<div class='pagination'><span class='paginationLeft'>Showing 1 - 10 of 41 </span><span class='paginationRight'>First | Previous | <a href="/News/Index?page=2">Next</a> | <a href="/News/Index?page=5">Last</a></span></div>
這是我在頁面上看到的,而不是它呈現的。我已經檢查過CSS和JS,它們都包含在內。
我在做什麼錯了?有任何想法嗎?
感謝
現在即時得到'的最好重載方法匹配「System.Web.WebPages.WebPageExecutingBase.Write(System.Web.WebPages.HelperResult)」有一些無效參數'當我刪除括號 – DarthVader 2012-04-19 21:35:38
'@ Html.Raw(Html.Pager(Model.PagedViewModel.PagedList).First(「First」).Next(「Next」).Previous(「Previous」).Last(「Last」) .Format(「{0} - {1} di {2}」).ToString())'這工作。反正thansk。 – DarthVader 2012-04-19 21:44:39