And*_*ter 0 asp.net-mvc redirect
有人知道如何使用 ASP.NET MVC 重定向到另一个服务器/解决方案吗?像这样的东西:
\n\npublic 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}\nRun Code Online (Sandbox Code Playgroud)\n\n我\xc2\xb4已经尝试了上面的两种方法,但它\xc2\xb4不起作用。
\n public ActionResult Redirect()
{
return new RedirectResult("http://www.google.com");
}
Run Code Online (Sandbox Code Playgroud)
希望这可以帮助 :-)
| 归档时间: |
|
| 查看次数: |
6850 次 |
| 最近记录: |