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?

1

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.