在运行中的asp.net MVC控制器中,我想重定向URL,但现在可以使用
[System.Web.Services.WebMethod(EnableSession = true)]
public ActionResult SearchResults()
{
Response.Redirect("https://hybridsoftware.net/b/error.htm?Error=test", true);
.....
我也尝试了false或仅URL,但它不起作用
RedirectResult
实例。[System.Web.Services.WebMethod(EnableSession = true)]
public ActionResult SearchResults()
{
return new RedirectResult("https://hybridsoftware.net/b/error.htm?Error=test");
}