ASP.NET MVC – Rename Action Method

Updated on     Kisan Patel

To rename the Action method of the controller, we use ActionName attribute before the action method of the
controller.

For Example.

[ActionName("MyNewActionName")]
public ActionResult Index(string Name = null)
{
    return View();
}

ASP.NET MVC

Leave a Reply