MVC5 Classic
nextPrevious Paging

The nextPrevious paging mode is a set of pagination controls consisting of Next and Previous buttons. In this topic, we will create a nextPrevious pager that uses the text "Next" and "Previous" on the paging buttons.

  1. Create an C1 ASP.NET MVC 5 Web Application.
  2. In the Solution Explorer, expand the Views | Shared folder and double-click _Layout.cshtml to open the file.
  3. Add the following markup within the <body> tags of the page.
    <div id="pagerNextPrevious">
            </div>
    
  4. Insert the following script to initialize the widget:
    <script id="scriptInit" type="text/javascript">
            $(document).ready(function () {
    $("#pagerNextPrevious2").wijpager({ pageCount: 150, pageIndex: 40, mode: "nextPrevious",
                    firstPageClass: "", previousPageClass: "", nextPageClass: "", lastPageClass: ""
                });
    });
        </script>
    
  5. Run your program. The paging element should appear as in the following image:

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum |  Documentation Feedback