码迷,mamicode.com
首页 > Web开发 > 详细

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

时间:2015-02-11 12:33:38      阅读:139      评论:0      收藏:0      [点我收藏+]

标签:

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();

 

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

标签:

原文地址:http://www.cnblogs.com/ecosu/p/4285779.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!