1

I have a situation on a single page web application. I use address information on the client to determine what data to load. I would like to be able to have url's like the following all direct to the Index action method on the HomeController.

http://mysite.com/Home/Index/Value/23/Another/34
http://mysite.com/Home/Index/Value/23/Another/34/StillAnother/45

In that controller method I would like a list of parameters such as:

{"Value", "23", "Another", "34"}
{"Value", "23", "Another", "34", "StillAnother", "45"}

Is this possible?

Aran Mulholland
  • 23,555
  • 29
  • 141
  • 228
  • possible duplicate of [Infinite URL Parameters for ASP.NET MVC Route](http://stackoverflow.com/questions/7515644/infinite-url-parameters-for-asp-net-mvc-route) – Zeph Aug 18 '13 at 16:19

1 Answers1

2

A single page web application doesn't mean having a single Controller and Action so I hope that's not what you're after. If you're just trying to bind additional URL parameters, then it is easily accomplished using routing. Take a look at this question: Infinite URL Parameters for ASP.NET MVC Route

Community
  • 1
  • 1
Timothy Strimple
  • 22,920
  • 6
  • 69
  • 76