Tôi đã đoạn mã sau vào bộ điều khiển của tôi: public class MyController : BaseController
{
public ActionResult MyMethod()
{
...
return RedirectToAction("Index", "Dashboard");
Tôi có điều này trong Global.asax.cs của tôi: routes.MapRoute("BetaAccess", "beta-access", new { controller = "Beta", action = "Index" });
Và điều này trong điều khiển của tôi (chỉ số hành động trên
Tôi đã đoạn mã sau: var routeDictionary = new RouteValueDictionary {{"action", "Login"}, {"controller", "Persons"}};
filterContext.Result = new RedirectToRouteResult(routeDictionary);
Điều đó sẽ tạ