您的位置:首页 > 编程语言 > ASP

ASP.NET MVC中Action实现页面跳转

2015-02-11 11:55 561 查看
1.return RedirectToAction(ActionName);//同一个Controller内
2.RedirectToAction(ActionName,ControllerName);//可以跳转到其他Controller
3.return RedirectToRoute(new {controller=ControllerName,action=ActionName});//可以跳转到其他Controller
4.Response.Redirect(ActionName);//同一个Controller
5.return Redirect(ActionName);//同一个Controller

return View(”Index”);//直接显示对应的页面不经过Controller的方法
return View(”~/Views/Home/Index”);//全路径,直接显示页面,不经过Controller方法
return View();
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: