I am doing code by watching Mosh ASP .Net tutorial. But I stack on a thing. My routing url is not working but query string is working.
Here is my code:
routing code
routes.MapRoute(
"MovieByReleaseDate",
"movie/released/{year}/{month}",
new {controller = "Movie", action = "ByReleaseDate" }
);
action code
public ActionResult ByReleaseDate(int year, int month)
{
return Content(year+"/"+month);
}
but link is not working. screenshot added http://localhost:49941/Movie/ByReleaseDate/2015/12
but link is not working. screenshot added
working with query working this only screenshot added
question from:https://stackoverflow.com/questions/65940447/how-to-access-asp-net-mvc-url