martijnboland / MvcPaging

ASP.NET MVC Paging HTML helper
https://blogs.taiga.nl/martijn/2008/08/27/paging-with-aspnet-mvc/
MIT License
290 stars 144 forks source link

Add new method AddRouteValueFor #32

Closed tryhp3 closed 10 years ago

tryhp3 commented 10 years ago

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) )

martijnboland commented 10 years ago

Good idea.

tryhp3 commented 10 years ago

Thanks for the quick implementation of this functionality.

martijnboland commented 10 years ago

You're welcome. This was fun to implement :).