David Smith

David Smith

  • NA
  • 2k
  • 0

MapRoute "url: "{controller}/{action}/{id}" Help

Oct 4 2017 2:35 PM
Does the MapRoute "url: "{controller}/{action}/{id}"," needs to modified to fit this actual http request below:
 
endpoint = "api/HelloWorld?zip=93011&service=CURRENT"
 
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}

Answers (2)