マスターズ、
次のようにいくつかのルートを定義しました。
routes.MapRoute(
name: "Default1",
url: "{a}",
defaults: new { controller = "Home", action = "Index" }
);
routes.MapRoute(
name: "Default2",
url: "{a}/{b}",
defaults: new { controller = "Home", action = "Index" }
);
routes.MapRoute(
name: "Default3",
url: "{a}/{b}/{c}",
defaults: new { controller = "Home", action = "Index" }
);
routes.MapRoute(
name: "Default4",
url: "{a}/{b}/{c}/{d}",
defaults: new { controller = "Home", action = "Index" }
);
そしてHomeControllerでは、
public ActionResult Index(dynamic data)
{
return View();
}
Indexメソッドの先頭にブレークポイントを設定しました。ここで、http://{MylocalIP:port}/a/b のような URL をヒットすると、ブレークポイントに固執します。しかし、a & b であるルート値を抽出できません。
どうすればこれを行うことができますか?助けてください。
前もって感謝します