0
,是否始終在modelState集合中路由數據,還是僅在modelState集合中,如果根據適用的控制器操作的模型綁定程序明確請求該鍵?在MVC3中,ASP.NET MVC3 ModelState和RouteData放置
爲了說明:
public HomeController { ActionResult Index(string id)
首頁/索引/ 5東西=別的
請問的ModelState字典有鑰匙的東西和別的值,或將它僅僅有鑰匙ID?
要擴大olivehour的答案,因爲'something'從未以任何方式綁定到任何'model',它不會在ModelState中。只有當物品以這種方式綁定時,纔會被添加。 – Buildstarted