0
我从一个JSON结果从控制器返回此,JSON在asp.net的MVC一个jsonresult返回
var genericResult = new { redirectUrl = Url.Action("Create", "Registration")
, isRedirect = true };
return Json(genericResult);
,但是当我通过Firebug的检查,
{"redirectUrl":"/","isRedirect":true}
if (data.isRedirect) {
window.location.href = json.redirectUrl;
}
任何建议....如何重定向?
没有值'{“redirectUrl”:“/”' – 2010-05-20 13:01:32
然后,您需要将'json.redirectUrl'修复为'data.redirectUrl'。 – BalusC 2010-05-20 13:03:57
你只是做了它的工作... – 2010-05-20 13:06:30