You can enable these other options when creating the link:
Html.ActionLink(
"View 10",
"Index",
new {
Column = Request["Column"],
Direction = Request["Direction"],
pageSize = 10
}
)
html-, pageSize:
Html.PaginateLink("View 10", 10)
:
public static class HtmlExtensions
{
public static MvcHtmlString PaginateLink(
this HtmlHelper helper,
string linkText,
int pageSize
)
{
var query = helper.ViewContext.HttpContext.Request.QueryString;
var values = query.AllKeys.ToDictionary(key => key, key => (object)query[key]);
values["pageSize"] = pageSize;
var routeValues = new RouteValueDictionary(values);
return helper.ActionLink(linkText, "Index", routeValues);
}
}