Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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?

share|improve this question
 
possible duplicate of Infinite URL Parameters for ASP.NET MVC Route –  Zeph Aug 18 '13 at 16:19
add comment

1 Answer

up vote 1 down vote accepted

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

share|improve this answer
 
thanks, this question is a duplicate then. –  Aran Mulholland May 3 '12 at 5:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.