0
我已經改變了默認路由配置到另一個控制器和動作像下面如何重定向註銷並登錄到另一個CONTROLER和行動
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Products", action = "Index", id = UrlParameter.Optional },
namespaces: new string[] { "WebStore.Controllers" }
);
前:
controller:Home
action:Index
現在:
controller:Products
action:Index
現在登錄和註銷後,它又回到(家/索引),而我想要它去
Products/Index
你需要從的AccountController 改變你有2個功能註銷等( )和登錄 – liran
請提供更多代碼示例。 –