I donβt think you can override the action link, but you can create an extension method and use it instead of the actionlink helper
using System.Web.Mvc;
using System.Web.Mvc.Html;
public static class HtmlHelperExtensions
{
public static MvcHtmlString CustomActionLink(this HtmlHelper Helper, string LinkText, string ActionName)
{
string link = getCustomName();
if(!String.IsNullOrWhiteSpace(link))
{
return link
}
return helper.ActionLink(LinkText, ActionName);
}
}
then in your opinion you can replace @ Html.ActionLink with @ Html.CustomActionLink. You must add a namespace at the beginning of each view, do not put it in the namespace, or add it to the configuration file