So I have a webforms and an mvc application combined and am trying to get things routed correctly. I have the default routing working as expected, but when I click on an actionlink in one of my views, it is not routing to the correct page.
Here's my routing code.
void RegisterRoutes(RouteCollection routes) {
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapPageRoute("",
"", "~/Default.aspx", true);
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Chips", action = "Index", id = UrlParameter.Optional }
);
}
void Application_Start(object sender, EventArgs e)
{
// Code that runs on application startup
AreaRegistration.RegisterAllAreas();
WebApiConfig.Register(GlobalConfiguration.Configuration);
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes);
RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
AuthConfig.RegisterAuth();
}
Here's an Action Link that I would click on:@Html.ActionLink("Properties Editor", "Index", "Property")
Here's my expected Result: urlgoeshere.com/Property/Index
Here's my actual Result:urlgoeshere.com/?action=Index&controller=Property
I'm not sure what to change to remedy this situation? Any ideas?