【发布时间】:2008-11-29 03:07:50
【问题描述】:
假设我有一个带有索引方法和更新方法的控制器。更新完成后,我想重定向到 Index()。我应该使用 return RedirectToAction("Index") 还是只调用 return Index()?有区别吗?
public ActionResult Index()
{
return View("Index", viewdata);
}
public ActionResult Update()
{
// do updates
return RedirectToAction("Index"); or
return Index();
}
【问题讨论】:
标签: c# asp.net asp.net-mvc