Fork me on GitHub

ScriptResourceExtensions class

This class contains two extension methods: HtmlHelper.RegisterMvcPagerScriptResource method is used to register the MvcPager jQuery plugin, and AjaxHelper.LoadMvcPagerScript method is used to dynamically load the MvcPager jQuery plugin, two methods can not be used at the same time.
Syntax:
public static void RegisterMvcPagerScriptResource(this HtmlHelper html)
public static void LoadMvcPagerScript(this AjaxHelper ajax)
Usage:
@{Html.RegisterMvcPagerScriptResource();}
    <script type="text/javascript">
    $(function () {
        @{ Ajax.LoadMvcPagerScript(); }
    });
    </script>
Remarks:
The MvcPager jQuery plugin is required if you need to invoke Javascript API, use page index box or in Ajax paging mode.