0
我有以下代码为我的路由的Web窗体和MVC。混合WebForms和MVC5路由不工作
MVC路由似乎工作正常,但当我混合两者时,不是Web表单。
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.IgnoreRoute("");
//MVC
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
//WebForms
routes.MapPageRoute(
"myPage",
"page/companyInfo/{*queryvalues}",
"~/company/details.aspx"
);
我需要为detail.aspx页面编写IgnoreRoute语句吗?
我试过先移动web表单路由,但仍然拒绝加载details.aspx页面 – seUser