///<summary> /// Displays a configurable "Go To Page:" form for instances of PagedList. ///</summary> ///<param name="html">This method is meant to hook off HtmlHelper as an extension method.</param> ///<param name="list">The PagedList to use as the data source.</param> ///<param name="formAction">The URL this form should submit the GET request to.</param> ///<param name="options">Formatting options.</param> ///<returns>Outputs the "Go To Page:" form HTML.</returns> public static HtmlString PagedListGoToPageForm(this HtmlHelper html, IPagedList list, string formAction, GoToFormRenderOptions options) { var htmlHelper = new Web.Common.HtmlHelper(new TagBuilderFactory()); var htmlString = htmlHelper.PagedListGoToPageForm(list, formAction, options); return(new HtmlString(htmlString)); }
///<summary> /// Displays a configurable paging control for instances of PagedList. ///</summary> ///<param name = "html">This method is meant to hook off HtmlHelper as an extension method.</param> ///<param name = "list">The PagedList to use as the data source.</param> ///<param name = "generatePageUrl">A function that takes the page number of the desired page and returns a URL-string that will load that page.</param> ///<param name = "options">Formatting options.</param> ///<returns>Outputs the paging control HTML.</returns> public static HtmlString PagedListPager(this HtmlHelper html, IPagedList list, Func <int, string> generatePageUrl, PagedListRenderOptions options) { var htmlHelper = new Web.Common.HtmlHelper(new TagBuilderFactory()); var htmlString = htmlHelper.PagedListPager(list, generatePageUrl, options); return(new HtmlString(htmlString)); }