my code export into excel works fine, 1 to 10 rows export if I filters rows that my code export filtered rows as my criteria. If I click to next page e.g 11 to 20 and then click on export button, export only first page 1 to 10 rows.
in my admin view export button code:
<div id='menub'><?php $this->widget('zii.widgets.CMenu', array(
'encodeLabel'=>false,
'htmlOptions'=>array(
'class'=>'actions'),
'items'=>array(
array(
'label'=>'<img align="absmiddle" alt = "'.Yii::t('internationalization','Export'). '" src = "'.Yii::app()->request->baseUrl.'/images/export.jpg" />',
//'label'=>'Export',
'url'=>array('expenses/excel'),
),
),
));
above link call to excel method in expenses controller.
code in my controller:
public function actionExcel() {
$issueDataProvider = $_SESSION['report-excel'];
$i = 0;
$data = array();
//fix column header.
//Could have used something like this - $data[]=array_keys($issueDataProvider->data[0]->attributes);.
//But that would return all attributes which i do not want
//$data[]=array_keys($issueDataProvider->data[0]->attributes);
$data[$i]['expenses_type_id'] = 'Type';
$data[$i]['amount'] = 'Amount';
$data[$i]['exp_date'] = 'Date';
$data[$i]['description'] = 'Description';
$i++;
//populate data array with the required data elements
foreach($issueDataProvider->data as $issue)
{
$data[$i]['expenses_type_id'] = $issue->expensesType->name;
$data[$i]['amount'] = $issue['amount'];
$data[$i]['exp_date'] = $issue['exp_date'];
$data[$i]['description'] = $issue['description'];
$i++;
}
Yii::import('application.extensions.phpexcel.JPhpExcel');
$xls = new JPhpExcel('UTF-8', false, 'test');
$xls->addArray($data);
$xls->generateXML('test_file');
}
I save data in
$_SESSION['report-excel']
and in my Model:
public function getSearchCriteria()
{
$criteria=new CDbCriteria;
if(!empty($this->from_date) && empty($this->to_date))
{
$criteria->condition = "exp_date >= '$this->from_date'"; // date is database date column field
}elseif(!empty($this->to_date) && empty($this->from_date))
{
$criteria->condition = "exp_date <= '$this->to_date'";
}elseif(!empty($this->to_date) && !empty($this->from_date))
{
$criteria->condition = "exp_date >= '$this->from_date' and exp_date <= '$this->to_date'";
}
$criteria->with = 'expensesType';
$criteria->join = 'LEFT JOIN expenses_type p ON t.expenses_type_id = p.id';
//s$criteria->compare('id',$this->id,true);
$criteria->compare('p.name',$this->expenses_type_id,true);
$criteria->compare('amount',$this->amount,true);
$criteria->compare('exp_date',$this->exp_date,true);
$criteria->compare('description',$this->description,true);
$criteria->order ='exp_date DESC';
return $criteria;
}
public function search()
{
// #todo Please modify the following code to remove attributes that should not be searched.
$data = new CActiveDataProvider(get_class($this), array(
'pagination'=>array('pageSize'=> Yii::app()->user->getState('pageSize',
Yii::app()->params['defaultPageSize']),),
'criteria'=>$this->getSearchCriteria(),
));
$_SESSION['report-excel']=$data;
return new CActiveDataProvider(get_class($this), array(
'criteria'=>$this->getSearchCriteria(),
));
every thing is works fine but on pagination.
kindly help.
CActiveDataProvider holds a set of items(all).So when you call actionExcel() the $page param is lost. So when you do actionAdmin() in your controller or search() in your model save your $_GET['page'] to an other session value. then set it when you do actionExcel().
$_GET['page'] = $_SESSION['your_session_page_value'];
Hope this helps
Best Regards
Related
In Silverstripe 4 I have a
DataObject 'PublicationObject',
a 'PublicationPage' and
a 'PublicationPageController'
PublicationObjects are displayed on PublicationPage through looping a PaginatedList. There is also a Pagination, showing the PageNumbers and Prev & Next - Links.
The Detail of PublicationObject is shown as 'Dataobject as Pages' using the UrlSegment.
If users are on the Detail- PublicationObject i want them to get back to the PublicationPage (the paginated list) with a Back - Link.
Two situations:
The user came from PublicationPage
and
The User came from a Search - Engine (Google) directly to the
DataObject- Detail.
I have done this like so:
$parentPage = Page::get()->Filter(array('UrlSegment' => $request->param('pageID')))->First();
$back = $_SERVER['HTTP_REFERER'];
if ((isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER']))) {
if (strtolower(parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST)) != strtolower($_SERVER['HTTP_HOST'])) {
// referer not from the same domain
$back = $parentPage->Link();
}
}
Thats not satisfying.
Question:
How do i get the Pagination - Link ( e.g: ...publicationen?start=20 ) when we are on the Detail - DataObject? How can we find the Position of the current Dataobject in that paginatedList in correlation with the Items per Page? (The Page- Link This Dataobject is on)
<?php
use SilverStripe\Control\Controller;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\View\Requirements;
use SilverStripe\Core\Convert;
use SilverStripe\SiteConfig\SiteConfig;
use SilverStripe\ORM\PaginatedList;
use SilverStripe\Control\Director;
use SilverStripe\ORM\DataObject;
use SilverStripe\ErrorPage\ErrorPage;
use SilverStripe\Dev\Debug;
use SilverStripe\Dev\Backtrace;
class PublicationPageController extends PageController
{
private static $allowed_actions = ['detail'];
private static $url_handlers = array(
);
public static $current_Publication_id;
public function init() {
parent::init();
}
public function detail(HTTPRequest $request)
{
$publication = PublicationObject::get_by_url_segment(Convert::raw2sql($request->param('ID')));
if (!$publication) {
return ErrorPage::response_for(404);
}
// HERE I WANT TO FIND THE POSITION OF THE DATAOBJECT IN THE PAGINATEDLIST OR RATHER THE PAGE - LINK THIS DATAOBJECT IS IN
//$paginatedList = $this->getPaginatedPublicationObjects();
//Debug::show($paginatedList->find('URLSegment', Convert::raw2sql($request->param('ID'))));
//Debug::show($paginatedList->toArray());
$parentPage = Page::get()->Filter(array('UrlSegment' => $request->param('pageID')))->First();
$back = $_SERVER['HTTP_REFERER'];
if ((isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER']))) {
if (strtolower(parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST)) != strtolower($_SERVER['HTTP_HOST'])) {
// referer not from the same domain
$back = $parentPage->Link();
}
}
static::$current_Publication_id = $publication->ID;
$id = $publication->ID;
if($publication){
$arrayData = array (
'Publication' => $publication,
'Back' => $back,
'SubTitle' => $publication->Title,
'MetaTitle' => $publication->Title,
);
return $this->customise($arrayData)->renderWith(array('PublicationDetailPage', 'Page'));
}else{
return $this->httpError(404, "Not Found");
}
}
public function getPaginatedPublicationObjects()
{
$list = $this->PublicationObjects()->sort('SortOrder');
return PaginatedList::create($list, $this->getRequest()); //->setPageLength(4)->setPaginationGetVar('start');
}
}
EDIT:
is there a more simple solution ? than this ? :
public function detail(HTTPRequest $request)
{
$publication = PublicationObject::get_by_url_segment(Convert::raw2sql($request->param('ID')));
if (!$publication) {
return ErrorPage::response_for(404);
}
//*******************************************************
// CREATE BACK - LINK
$paginatedList = $this->getPaginatedPublicationObjects();
$dO = PublicationObject::get();
$paginationVar = $paginatedList->getPaginationGetVar();
$sqlQuery = new SQLSelect();
$sqlQuery->setFrom('PublicationObject');
$sqlQuery->selectField('URLSegment');
$sqlQuery->setOrderBy('SortOrder');
$rawSQL = $sqlQuery->sql($parameters);
$result = $sqlQuery->execute();
$list = [];
foreach($result as $row) {
$list[]['URLSegment'] = $row['URLSegment'];
}
$list = array_chunk($list, $paginatedList->getPageLength(), true);
$start = '';
$back = '';
$i = 0;
$newArray = [];
foreach ($list as $k => $subArr) {
$newArray[$i] = $subArr;
unset($subArr[$k]['URLSegment']);
foreach ($newArray[$i] as $key => $val) {
if ($val['URLSegment'] === Convert::raw2sql($request->param('ID'))) {
$start = '?'.$paginationVar.'='.$i;
}
}
$i = $i + $paginatedList->getPageLength();
}
$back = Controller::join_links($this->Link(), $start);
// END CREATE BACK - LINK
//*****************************************************
static::$current_Publication_id = $publication->ID;
$id = $publication->ID;
if($publication){
$arrayData = array (
'Publication' => $publication,
'Back' => $back,
'MyLinkMode' => 'active',
'SubTitle' => $publication->Title,
'MetaTitle' => $publication->Title,
);
return $this->customise($arrayData)->renderWith(array('PublicationDetailPage', 'Page'));
}else{
return $this->httpError(404, "Not Found");
}
}
You can simply pass the page number as a get var in the URL from the PublicationPage. The detail() method can then grab the get var and if there's a value for the page number passed in, add it to the back link's URL.
In the template:
<% loop $MyPaginatedList %>
Click me
<% end_loop %>
In your controller's detail() method:
$pageNum = $request->getVar('onPage');
if ($pageNum) {
// Add the pagenum to the back link here
}
Edit
You've expressed that you want this to use the page start offset (so you can just plug it into the url using ?start=[offset]), and that you want an example that also covers people coming in from outside your site. I therefore propose the following:
Do as above, but using PageStart instead of CurrentPage - this will mean you don't have to re-compute the offset any time someone clicks the link from your paginated list.
If there is no onPage (or pageOffset as I've renamed it below, assuming you'll use PageStart) get variable, then assuming you can ensure your SortOrder values are all unique, you can check how many items are in the list before the current item - which gives you your item offset. From that you can calculate what page it's on, and what the page offset is for that page, which is your start value.
public function detail(HTTPRequest $request)
{
$publication = PublicationObject::get_by_url_segment(Convert::raw2sql($request->param('ID')));
$paginatedList = $this->getPaginatedPublicationObjects();
// Back link logic starts here
$pageOffset = $request->getVar('pageOffset');
if ($pageOffset === null) {
$recordOffset = $paginatedList->filter('SortOrder:LessThan', $publication->SortOrder)->count() + 1;
$perPage = $paginatedList->getPageLength();
$page = floor($recordOffset / $perPage) + 1;
$pageOffset = ($page - 1) * $perPage;
}
$back = $this->Link() . '?' . $paginatedList->getPaginationGetVar() . '=' . $pageOffset;
// Back link logic ends here
//.....
}
I have created a model and added the $has_many for selecting multiple products. This is working fine but I am unable to make the selected products sortable by drag and drop. I know this is possible I have seen it. But I am unable to find anything in the documentation that shows how to get this done. Here is my model:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
require_once(FUEL_PATH.'models/Base_module_model.php');
/**
* This model handles setting up the form fields for our contact form
*
*/
class Products_category_model extends Base_module_model {
public $required = array('name', 'published');
public $has_many = array('products' => array(FUEL_FOLDER => 'Products_model'));
function __construct()
{
parent::__construct('w_product_categories');
}
/*
This will provide the list of records for display in the Admin Panel
Note how the "excerpt" will display, but truncated
Because we are using some MySQL functions in our select statement,
we pass FALSE in as the second parament to prevent CI auto escaping of fields
*/
function list_items($limit = null, $offset = null, $col = 'name', $order = 'asc', $just_count = false)
{
$this->db->select('id, name, published', FALSE);
$data = parent::list_items($limit, $offset, $col, $order);
return $data;
}
function form_fields($values = array(), $related = array())
{
$fields = parent::form_fields($values, $related);
return $fields;
}
}
class Product_category_model extends Base_module_record {
}
So it is very simple I discovered. I added this in the form fields function:
// Makes the has many drag and drop sortable.
$fields['products']['sorting'] = TRUE;
$fields['products']['after_html'] = "<div style=\"clear:both;font-style:italic\">NOTE: you can sort selected product to your choosing by clicking on the product and then dragging it into the desired placement in the list</div>";
With lumen, I have the problem that this is always 1, also when I go to /artikel?page=2:
LengthAwarePaginator::resolveCurrentPage();
the complete code:
<?php namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Collection;
class ArtikelController extends Controller {
public function index()
{
$dir = '../resources/views/artikel/';
$files = array_diff(scandir($dir), array('..', '.'));
$artikel = array();
foreach($files as $k => $v)
{
$id = substr($v,0,1);
$artikel[$id]['id'] = $id;
$artikel[$id]['name'] = substr($v,0,strpos($v,'.blade.php'));
}
//Get current page form url e.g. &page=6
$currentPage = LengthAwarePaginator::resolveCurrentPage();
#dd($currentPage);
//Create a new Laravel collection from the array data
$collection = new Collection($artikel);
//Define how many items we want to be visible in each page
$perPage = 2;
//Slice the collection to get the items to display in current page
$currentPageResults = $collection->slice($currentPage * $perPage, $perPage)->sortByDesc('id')->all();
//Create our paginator and pass it to the view
$paginatedResults = new LengthAwarePaginator($currentPageResults, count($collection), $perPage);
$paginatedResults->setPath('artikel');
return view('artikel', ['artikel' => $paginatedResults]);
}
I can't find the mistake. What could be the reason? (I have also updated to "laravel/lumen-framework": "5.1.*")
You can use this simple way to get your current page:
$currentPage = (int) app('request')->get('page', $default = '0');
I have :
a 3 level menu
custom records from a table called
"tx_products_domain_model_product"
products have a field called "url_alias"
On any page on that menu, I can have a product record.
For pages that have a product record I want the link to look like:
http://www.sitedomain.com/<url_alias>
Can this be done with typoscript?
EDIT
It looks like it's too complex to do all this with typoscript, so I'm using a userFunc. I'm checking if there is a product record with a shop ID and want to return that shop id. If not, return the current menu page UID. The problem is, how can I pass the menu page UID as parameter to the userFunc?
class user_productsOnCurrentPage
{
function main( $content, $conf )
{
if ( TYPO3_MODE !== 'FE' )
{
return FALSE;
}
$product = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow(
'shop_id', 'tx_products_domain_model_product', 'pid=' . $conf['currentPageId'] . ' AND deleted=0 AND hidden=0' );
if ( is_array( $product ) && ! empty( $product ['shop_id'] ) )
{
return $product ['shop_id'];
}
return $conf['currentPageId'];
}
}
The menu:
lib.mainMenu = HMENU
lib.mainMenu {
...
1 = TMENU
1 {
...
NO = 1
NO {
...
# show direct url for external links
doNotLinkIt = 1
stdWrap.cObject = CASE
stdWrap.cObject {
key.field = doktype
default = TEXT
default {
field = nav_title // title
typolink.parameter.cObject = USER
typolink.parameter.cObject {
userFunc = user_productsOnCurrentPage->main
currentPageId = ?????
}
typolink.wrap = |<span><strong></strong></span>
typolink.ATagBeforeWrap = 1
stdWrap.htmlSpecialChars = 1
}
...
I could access the page ID directly in the user function:
TypoScript:
typolink.userFunc = user_mcfazabosOnCurrentPage->main
PHP:
$pageId = $this->cObj->getFieldVal( 'uid' );
I am using PagedList.Mvc for paging in my MVC 5 app.
Question: The ellipsis button, which is after page#10 in screen shot below, does not do anything when clicked. Is that how its supposed to be, or I can make the ellipsis button work so clicking it would display the next set of pages?
The html helper being used in the View for displaying this pager is as below.
#Html.PagedListPager(Model, page => Url.Action("Index",
new { page, sortOrder = ViewBag.CurrentSort, SearchText = ViewBag.SearchText }))
The solution that worked is to hide the ellipsis button.
SOLUTION
This solution involves hiding the ellipsis button. For this, you would need to make sure that the property of DisplayEllipsesWhenNotShowingAllPageNumbers under PagedListRenderOptions class is set to false, since its true by default. Its this setting that causes the pager to show the ellipsis button.
The code snippet given below will go into your View or PartialView html, and you will need to change some of the custom parameters like sortOrder and action name etc.
Hide Ellipsis button when Pager is ajaxified
#Html.PagedListPager(Model,
page => Url.Action("GetOrderDetails", new { page, sortOrder = ViewBag.CurrentSort,
, command = "paging", PageSize = ViewBag.PageSize }),
PagedListRenderOptions.EnableUnobtrusiveAjaxReplacing(
new PagedListRenderOptions { DisplayEllipsesWhenNotShowingAllPageNumbers = false},
new AjaxOptions() { HttpMethod = "POST", UpdateTargetId = "gridTable",
OnBegin = "OnBegin", OnSuccess = "OnSuccess" }))
Hide Ellipsis button when Pager is non-ajaxified
#Html.PagedListPager(Model, page => Url.Action("Index", new { page,
sortOrder = ViewBag.CurrentSort, command = "paging", PageSize = ViewBag.PageSize}),
new PagedListRenderOptions { DisplayEllipsesWhenNotShowingAllPageNumbers = false })
ANOTHER SOLUTION
Download the source code from GitHub at https://github.com/troygoode/PagedList and open the solution in Visual Studio.
In HtmlHelper.cs class add the following 2 methods.
private static TagBuilder PreviousEllipsis(IPagedList list, Func<int, string> generatePageUrl, PagedListRenderOptions options, int firstPageToDisplay)
{
var targetPageNumber = firstPageToDisplay - 1;//list.PageNumber - 1;
var previous = new TagBuilder("a")
{
InnerHtml = string.Format(options.EllipsesFormat, targetPageNumber)
};
previous.Attributes["rel"] = "prev";
if (!list.HasPreviousPage)
return WrapInListItem(previous, options, "PagedList-skipToPrevious","disabled");
previous.Attributes["href"] = generatePageUrl(targetPageNumber);
return WrapInListItem(previous, options, "PagedList-skipToPrevious");
}
private static TagBuilder NextEllipsis(IPagedList list, Func<int, string> generatePageUrl, PagedListRenderOptions options, int lastPageToDisplay)
{
var targetPageNumber = lastPageToDisplay + 1;// list.PageNumber +1;
var next = new TagBuilder("a")
{
InnerHtml = string.Format(options.EllipsesFormat, targetPageNumber)
};
next.Attributes["rel"] = "next";
if (!list.HasNextPage)
return WrapInListItem(next, options, "PagedList-skipToNext", "disabled");
next.Attributes["href"] = generatePageUrl(targetPageNumber);
return WrapInListItem(next, options, "PagedList-skipToNext");
}
In same HtmlHelper.cs, replace an existing method of PagedListPager with following code. There are only 2 changes in this code and these are the 2 lines inserted just before the commented line of //listItemLinks.Add(Ellipses(options));. There are 2 places in the method where this line appeared in original code, and these have been commented and replaced by calls to the new methods defined in above code snippet.
///<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 MvcHtmlString PagedListPager(this System.Web.Mvc.HtmlHelper html,
IPagedList list,
Func<int, string> generatePageUrl,
PagedListRenderOptions options)
{
if (options.Display == PagedListDisplayMode.Never || (options.Display == PagedListDisplayMode.IfNeeded && list.PageCount <= 1))
return null;
var listItemLinks = new List<TagBuilder>();
//calculate start and end of range of page numbers
var firstPageToDisplay = 1;
var lastPageToDisplay = list.PageCount;
var pageNumbersToDisplay = lastPageToDisplay;
if (options.MaximumPageNumbersToDisplay.HasValue && list.PageCount > options.MaximumPageNumbersToDisplay)
{
// cannot fit all pages into pager
var maxPageNumbersToDisplay = options.MaximumPageNumbersToDisplay.Value;
firstPageToDisplay = list.PageNumber - maxPageNumbersToDisplay / 2;
if (firstPageToDisplay < 1)
firstPageToDisplay = 1;
pageNumbersToDisplay = maxPageNumbersToDisplay;
lastPageToDisplay = firstPageToDisplay + pageNumbersToDisplay - 1;
if (lastPageToDisplay > list.PageCount)
firstPageToDisplay = list.PageCount - maxPageNumbersToDisplay + 1;
}
//first
if (options.DisplayLinkToFirstPage == PagedListDisplayMode.Always || (options.DisplayLinkToFirstPage == PagedListDisplayMode.IfNeeded && firstPageToDisplay > 1))
listItemLinks.Add(First(list, generatePageUrl, options));
//previous
if (options.DisplayLinkToPreviousPage == PagedListDisplayMode.Always || (options.DisplayLinkToPreviousPage == PagedListDisplayMode.IfNeeded && !list.IsFirstPage))
listItemLinks.Add(Previous(list, generatePageUrl, options));
//text
if (options.DisplayPageCountAndCurrentLocation)
listItemLinks.Add(PageCountAndLocationText(list, options));
//text
if (options.DisplayItemSliceAndTotal)
listItemLinks.Add(ItemSliceAndTotalText(list, options));
//page
if (options.DisplayLinkToIndividualPages)
{
//if there are previous page numbers not displayed, show an ellipsis
if (options.DisplayEllipsesWhenNotShowingAllPageNumbers && firstPageToDisplay > 1)
listItemLinks.Add(PreviousEllipsis(list, generatePageUrl, options, firstPageToDisplay));
//listItemLinks.Add(Ellipses(options));
foreach (var i in Enumerable.Range(firstPageToDisplay, pageNumbersToDisplay))
{
//show delimiter between page numbers
if (i > firstPageToDisplay && !string.IsNullOrWhiteSpace(options.DelimiterBetweenPageNumbers))
listItemLinks.Add(WrapInListItem(options.DelimiterBetweenPageNumbers));
//show page number link
listItemLinks.Add(Page(i, list, generatePageUrl, options));
}
//if there are subsequent page numbers not displayed, show an ellipsis
if (options.DisplayEllipsesWhenNotShowingAllPageNumbers && (firstPageToDisplay + pageNumbersToDisplay - 1) < list.PageCount)
listItemLinks.Add(NextEllipsis(list, generatePageUrl, options, lastPageToDisplay));
//listItemLinks.Add(Ellipses(options));
}
//next
if (options.DisplayLinkToNextPage == PagedListDisplayMode.Always || (options.DisplayLinkToNextPage == PagedListDisplayMode.IfNeeded && !list.IsLastPage))
listItemLinks.Add(Next(list, generatePageUrl, options));
//last
if (options.DisplayLinkToLastPage == PagedListDisplayMode.Always || (options.DisplayLinkToLastPage == PagedListDisplayMode.IfNeeded && lastPageToDisplay < list.PageCount))
listItemLinks.Add(Last(list, generatePageUrl, options));
if(listItemLinks.Any())
{
//append class to first item in list?
if (!string.IsNullOrWhiteSpace(options.ClassToApplyToFirstListItemInPager))
listItemLinks.First().AddCssClass(options.ClassToApplyToFirstListItemInPager);
//append class to last item in list?
if (!string.IsNullOrWhiteSpace(options.ClassToApplyToLastListItemInPager))
listItemLinks.Last().AddCssClass(options.ClassToApplyToLastListItemInPager);
//append classes to all list item links
foreach (var li in listItemLinks)
foreach (var c in options.LiElementClasses ?? Enumerable.Empty<string>())
li.AddCssClass(c);
}
//collapse all of the list items into one big string
var listItemLinksString = listItemLinks.Aggregate(
new StringBuilder(),
(sb, listItem) => sb.Append(listItem.ToString()),
sb=> sb.ToString()
);
var ul = new TagBuilder("ul")
{
InnerHtml = listItemLinksString
};
foreach (var c in options.UlElementClasses ?? Enumerable.Empty<string>())
ul.AddCssClass(c);
var outerDiv = new TagBuilder("div");
foreach(var c in options.ContainerDivClasses ?? Enumerable.Empty<string>())
outerDiv.AddCssClass(c);
outerDiv.InnerHtml = ul.ToString();
return new MvcHtmlString(outerDiv.ToString());
}
Then, rebuild the code and copy over the dlls to your bin folder. After this you will find that the ellipsis button is enabled, and will take you to the page just before the first page of current set of page numbers, or the page just after this current set. I tested this and it worked.