重定向到另一台服务器 - ASP MVC

And*_*ter 0 asp.net-mvc redirect

有人知道如何使用 ASP.NET MVC 重定向到另一个服务器/解决方案吗?像这样的东西:

\n\n
public void Redir(String param)\n{\n   // Redirect to another application, ie:\n   // Redirect("www.google.com");\n   // or\n   // Response.StatusCode= 301;\n   // Response.AddHeader("Location","www.google.com");\n   // Response.End();\n\n}\n
Run Code Online (Sandbox Code Playgroud)\n\n

我\xc2\xb4已经尝试了上面的两种方法,但它\xc2\xb4不起作用。

\n

Wes*_*olf 5

    public ActionResult Redirect()
    {
        return new RedirectResult("http://www.google.com");
    }
Run Code Online (Sandbox Code Playgroud)

希望这可以帮助 :-)