ビューに Html.GlobalisedPageLinks 拡張メソッドがありますが、ビューモデルにメソッドが含まれておらず、無効な引数があることを示すレッドラインが表示されますか?
ここに行:
<div class="actions-left">
<%= Html.GlobalisedPageLinks(Amico.Web.Mvc.Extensions.Enums.PageLinksFormat.Empty, Model.CurrentPage, Model.PageSize, Model.Total, x => Url.Action("Index", "Scorm", new { area = "Admin", page = x }))%>
</div>
拡張方法:
public static string GlobalisedPageLinks(this HtmlHelper html, Amico.Web.Mvc.Extensions.Enums.PageLinksFormat format, int currentPage, int pageSize, int totalResults, Func<int, string> pageUrl)
{
int totalPages = Math.Max(Convert.ToInt32(Math.Ceiling((double)totalResults / pageSize)), 1);
int startresult = ((Math.Max(1, currentPage) - 1) * pageSize) + 1;
int endresult = Math.Min(startresult + (pageSize - 1), totalResults);
string pagesText = html.Resource(Resources.Global.PageLinks.PageLinksFormatPages, currentPage, totalPages);
string resultsText = html.Resource(Resources.Global.PageLinks.PageLinksFormatResults, startresult, endresult, totalResults);
string firstText = html.Resource(Resources.Global.PageLinks.First);
string previousText = html.Resource(Resources.Global.PageLinks.Previous);
string nextText = html.Resource(Resources.Global.PageLinks.Next);
string lastText = html.Resource(Resources.Global.PageLinks.Last);
return "<span class='page-links'>" + html.PageLinks(format, currentPage, pageSize, totalResults, pageUrl,
pagesText, resultsText, firstText, previousText, nextText, lastText) + "</span>";
}
私は何が欠けていますか?ありがとう