Am I calling RedirectToRoute
correctly?
RouteConfig.cs:
routes.MapRoute(
name: "Contact Us",
url: "ContactUs",
defaults: new {controller = "Home", action = "ContactUs"}
);
Handler.cs
HttpContext.Current.Response.RedirectToRoute("Contact Us",
new { controller = "Home", action = "ContactUs" });
While what you are doing works, it is also both unnecessary and overkill. The second parameter is reserved for either a RouteValueDictionary or an object used in the construction of additional routing details, which are already set as the default for the named route.
In your case, you can simply use the string name of the route, via this overload.