I am returning this from a json result from a controller,
var genericResult = new { redirectUrl = Url.Action("Create", "Registration")
, isRedirect = true };
return Json(genericResult);
but when i inspect through firebug,
{"redirectUrl":"/","开发者_如何转开发isRedirect":true}
if (data.isRedirect) {
window.location.href = json.redirectUrl;
}
Any suggestion.... How to redirect?
Depending on how it's been declared, either fix data
to json
, or fix json
to data
.
精彩评论