RedirectResult

public ActionResult Index()
{
    //Redirects to another action method by using its URL.
    return new RedirectResult("http://www.google.com");
}

Action 方法通常返回一个称为操作结果的结果。ActionResult 类是所有操作结果的基类。ActionInvoker 根据操作方法执行的任务决定返回哪种类型的操作结果。

可以明确指出要返回的类型,但通常没有必要。

public RedirectResult Index()
{
    //Redirects to another action method by using its URL.
    return new RedirectResult("http://www.google.com");
}