Given an action method with a route defined as below, the URL /Index does not match any route.
public class HomeController : Controller
{
[GET("Index?{page=1}")]
public ActionResult Index(int page)
{
return View("Index", page);
}
}
I expected that a URL like /Index would match this route and default the page routedata value to 1, but it does not.
When I actually specify a page querystring value (like /Index?page=4) it works as expected.