1
我在單個頁面的Web應用程序中遇到了一種情況。我使用客戶端上的地址信息來確定要加載的數據。我希望能夠像下面的所有url直接指向HomeController上的Index操作方法。帶有多個可選參數的ASP.NET MVC路由
http://mysite.com/Home/Index/Value/23/Another/34
http://mysite.com/Home/Index/Value/23/Another/34/StillAnother/45
在該控制器的方法,我想的參數,如清單:
{"Value", "23", "Another", "34"}
{"Value", "23", "Another", "34", "StillAnother", "45"}
這可能嗎?
可能重複http://stackoverflow.com/questions/7515644/infinite-url-parameters-for-asp-net- mvc-route) – Zeph