json returned from a jsonresult in asp.net mvc .....
- by Pandiya Chendur
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?