An existing RedirectToAction signature is
RedirectToAction(string action, RouteValueDictionary routeValues);
I wish to make.
RedirectToAction(RouteValueDictionary routeValues);
So I created the following
public static class MvcControllerExtension
{
public static RedirectToRouteResult RedirectToAction
(this Controller controller, RouteValueDictionary routeValues)
{
return controller.RedirectToAction
(routeValues["Action"].ToString(), routeValues);
}
}
However, the IDE for that code is showing a Recursive Call
because it can only see itself.
It does not see this signature.
I have included using System.Web.Mvc;
in the extension class.
How can I fix this? thanks.
Additional:
Here is the extention source code. Note the recursive symbol.