json returned from a jsonresult in asp.net mvc .....

Posted by Pandiya Chendur on Stack Overflow See other posts from Stack Overflow or by Pandiya Chendur
Published on 2010-05-20T12:56:44Z Indexed on 2010/05/20 13:00 UTC
Read the original article Hit count: 405

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?

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about jsonresult