Masters,
I've defined few routes as follow.
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" }
);
and in HomeController,
public ActionResult Index(dynamic data)
{
return View();
}
I set a break-point at begining of Index method Now, when i hit URL like : http://{MylocalIP:port}/a/b sticks on break point. but I am unable to extract route values that is a & b.
How can we do this? Please help.
Thanks in advance
dataalways null or is it binding to the wrong thing?