I have setup some areas, but I'm not sure how to Redirect to them via the RedirectToAction method. There doesn't seem to be any Area parameter I can feed it.
Thanks
I have setup some areas, but I'm not sure how to Redirect to them via the RedirectToAction method. There doesn't seem to be any Area parameter I can feed it.
Thanks
This will work too:
return RedirectToAction("ActionName","ControllerName", new { area = "AreaName" });
You will need to use RedirectToRoute if you are trying to redirect to an ActionResult outside the current area. You will first want to make sure you have a route to the ActionResult you would like to redirect to registered for your area. The following article is helpful for this:
Once you have routes in place, you can do return RedirectToRoute("MyRouteName");