0

我从控制器的 json 结果返回这个,

 var genericResult = new { redirectUrl = Url.Action("Create", "Registration")
                                , isRedirect = true };
return Json(genericResult);

但是当我通过萤火虫检查时,

{"redirectUrl":"/","isRedirect":true}

       if (data.isRedirect) {
            window.location.href = json.redirectUrl;
        }

任何建议....如何重定向?

4

1 回答 1

3

根据它的声明方式,或者修复datajson,或者修复jsondata.

于 2010-05-20T12:58:53.370 回答