一,控制器ide
CheckIndexAreaRegistration.cs public class CheckIndexAreaRegistration : AreaRegistration { public override string AreaName { get { return "CheckIndex"; } } public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute( "CheckIndex_default", "CheckIndex/{controller}/{action}/{id}", new { action = "Index", id = UrlParameter.Optional }, new string[] { typeof(CheckIndexAreaRegistration).Namespace } //增長此行,否則會出現controller命名重複的exception ); } } ShowAllController.cs public class ShowAllController : BaseController { [SkipRole] public ActionResult Index() { return View(); } }
二,視圖spa