Click here to Skip to main content
15,921,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have using the mvcpager version 3.0.1.1

@Ajax.Pager(Model, new PagerOptions { PageIndexParameterName = "pageno", ShowDisabledPagerItems = true, ShowPrevNext = true, ShowFirstLast = false, PrevPageText = "Previous", NextPageText = "Next", PageNumberFormatString = "", SeparatorHtml = "  " }, new AjaxOptions { UpdateTargetId = "divCategory" })


In the above code the error is occured like

C#
'Webdiyer.WebControls.Mvc.PagerOptions' does not contain a definition for 'SeparatorHtml


pls Help me..
Thanks in advance
Posted

Looking at the source code[^], the error message is (unsurprisingly) correct. The PagerOptions class does not have a property called SeparatorHtml.

To fix your code, remove that property from your object initializer:
@Ajax.Pager(Model, new PagerOptions { PageIndexParameterName = "pageno", ShowDisabledPagerItems = true, ShowPrevNext = true, ShowFirstLast = false, PrevPageText = "Previous", NextPageText = "Next", PageNumberFormatString = "" }, new AjaxOptions { UpdateTargetId = "divCategory" })
 
Share this answer
 
C#
@Html.Raw(Ajax.Pager(
       new Options
       {
           PageSize = Model.PageSize,
           TotalItemCount = Model.TotalItemCount,
           CurrentPage = Model.PageNumber,
           ItemTexts = new ItemTexts() { Next = "Next", Previous = "Previous", Page = "P" },
           ItemIcon = new ItemIcon() { First = "icon-backward", Previous = "icon-chevron-left", Next = "icon-chevron-right", Last = "icon-forward" },
           TooltipTitles = new TooltipTitles() { Next = "Next page", Previous = "Previous page", Page = "Go to page {0}.", First = "Go To First Page", Last = "Go To Last Page" },
           Size = Size.normal,
           Alignment = Alignment.centered,
           IsShowControls = true,
           IsShowFirstLast = true
       },
       new AjaxOptions
       {
           UpdateTargetId = "grid-list",
           OnBegin = "beginPaging",
           OnSuccess = "successPaging",
           OnFailure = "failurePaging"
       }, new { controller = "
 
Share this answer
 
please refer this demo : https://twittstrap.com/ajax-paging-with-bootstrap-in-mvc-4/[^]
http://mvcpaging.apphb.com/
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900