using System.Web.Mvc;namespace web.Areas.FrameSet{ ???public class FrameSetAreaRegistration : AreaRegistration ???{ ???????public override string AreaName ???????{ ???????????get ???????????{ ???????????????return "FrameSet"; ???????????} ???????} ???????public override void RegisterArea(AreaRegistrationContext context) ???????{ ???????????context.MapRoute( ???????????????"FrameSet_default", ???????????????"FrameSet/{controller}/{action}/{id}", ???????????????new { controller = "Frame", action = "Main", id = UrlParameter.Optional }, ???????????????new string[] { "web.Areas.FrameSet.Controllers" } ???????????); ???????} ???}}
再使用如下语句就可以在不同Area间跳转:
return RedirectToAction("Main", "Frame", new { area = "FrameSet" });
再传2个参数:
return RedirectToAction("Main", "Frame", new { area = "FrameSet", a = 2, b = "b" });
?a=2&b=b
MVC-RedirectToAction跳转到其他Area
原文地址:http://www.cnblogs.com/littlewrong/p/7473852.html