I am trying to create an extension method similar to the MVCContrib RedirectToAction method by creating a method that will take the #anchor argument and add this to Url. I am familiar with this question , but he did not score much. It is also possible to add values to the query string, but this will not work for binding.
public static RedirectToRouteResult RedirectToAction<T>(this Controller controller, Expression<Action<T>> action, string anchor) where T : Controller
{
var result = new RedirectToRouteResult<T>(action);
return result;
}
source
share