ASP.NET MVC中的页面跳转

1.使用传统的Response.Redirect
例如
string url = "/account/create";
Response.Redirect(url);

2.使用MVC新的RedirectToAction("Action name","Controller name");
return RedirectToAction("Index","Home");//跳转到首页。
第一个参数是action 的名字,第二个参数是控制器controller的名字,方法返回的是个ActionResult.也就是返回视图。
posted @ 2009-09-06 20:58  XuShop  阅读(6582)  评论(0编辑  收藏  举报