public static string Pager(this AjaxHelper ajaxHelper, Options options, AjaxOptions ajaxOptions, RouteValueDictionary valuesDictionary)
 {
     if (valuesDictionary == null)
     {
         valuesDictionary = new RouteValueDictionary();
     }
     if (options.ActionName != null)
     {
         if (valuesDictionary.ContainsKey("action"))
         {
             throw new ArgumentException("The valuesDictionary already contains an action.", "actionName");
         }
         valuesDictionary.Add("action", options.ActionName);
     }
     var pager = new AjaxPager(ajaxHelper, ajaxHelper.ViewContext, options, ajaxOptions, valuesDictionary);
     return pager.RenderHtml();
 }
Beispiel #2
0
        public static string Pager(this AjaxHelper ajaxHelper, Options options, AjaxOptions ajaxOptions, RouteValueDictionary valuesDictionary)
        {
            if (valuesDictionary == null)
            {
                valuesDictionary = new RouteValueDictionary();
            }
            if (options.ActionName != null)
            {
                if (valuesDictionary.ContainsKey("action"))
                {
                    throw new Exception("The valuesDictionary already contains an action.");
                }
                valuesDictionary.Add("action", options.ActionName);
            }
            var pager = new AjaxPager(ajaxHelper, ajaxHelper.ViewContext, options, ajaxOptions, valuesDictionary);

            return(pager.RenderHtml());
        }
Beispiel #3
0
        public static string Pager(this AjaxHelper ajaxHelper, AjaxOptions ajaxOptions, int pageSize, int currentPage, int totalItemCount, string actionName, RouteValueDictionary valuesDictionary)
        {
            if (valuesDictionary == null)
            {
                valuesDictionary = new RouteValueDictionary();
            }
            if (actionName != null)
            {
                if (valuesDictionary.ContainsKey("action"))
                {
                    throw new ArgumentException("The valuesDictionary already contains an action.", "actionName");
                }
                valuesDictionary.Add("action", actionName);
            }
            var pager = new AjaxPager(ajaxHelper, ajaxHelper.ViewContext, pageSize, currentPage, totalItemCount, ajaxOptions, valuesDictionary);

            return(pager.RenderHtml());
        }