开发者

json returned from a jsonresult in asp.net mvc

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜