MvcPager does not support repeated querystring parameters


Expected result:
Actual result:
You're in good company as the same bug exists in the ASP.NET MVC WebGrid and is marked as "Won't fix":
http://aspnetwebstack.codeplex.com/workitem/635 - I suspect the fix will be similar.

I believe it also exists in your UrlPager project.


Webdiyer wrote Jul 12, 2013 at 9:24 AM

I've never seen such a url, can you explain why your need repeated parameters in url? why not just use ?a=1,2,3...? Thanks!

JocularJoe wrote Jul 22, 2013 at 7:48 AM

why not just use ?a=1,2,3...?
Consider an action method that takes a list or array parameter:
public ActionResult MyAction(IList<int> a)
The default model binder will automatically convert a=1&a=2&a=3 into a list or array parameter. It won't work with a=1,2,3 and you will need to parse the string manually in the action method.