I think a good idea would be to add a new method AddRouteValueFor. For example:
@Html.Pager(pageSize, pageNumber, totalItemCount).Options(o => o
.AddRouteValueFor(m => m.Filter.Name)
.AddRouteValueFor(m => m.Filter.City)
.AddRouteValueFor(m => m.Model.Filter.Postcode)
)
I have a filter field. For example:
@Html.Pager(pageSize, pageNumber, totalItemCount).Options(o => o .AddRouteValue("Filter.Name", Model.Filter.Name) .AddRouteValue("Filter.City", Model.Filter.City) .AddRouteValue("Filter.Postcode", Model.Filter.Postcode) )
I think a good idea would be to add a new method AddRouteValueFor. For example: @Html.Pager(pageSize, pageNumber, totalItemCount).Options(o => o .AddRouteValueFor(m => m.Filter.Name) .AddRouteValueFor(m => m.Filter.City) .AddRouteValueFor(m => m.Model.Filter.Postcode) )