I am trying to change a URL in MVC 5 from "Master" to "Master-Franchise" & I thought the following would work but the URL is still just "Master".
// GET: Master-Fanchise
[Route("Master-Fanchise")]
public ActionResult Master()
{
return View();
}
Use
ActionName
attributes which allows you to give action name for controller method regardless of method name.Have you enabled attribute routing as it is not turned on by default
you may also need to change the controller