Use RedirectToAction in a JsonResult Action?

Posted by CmdrTallen on Stack Overflow See other posts from Stack Overflow or by CmdrTallen
Published on 2010-05-01T16:58:14Z Indexed on 2010/05/01 17:17 UTC
Read the original article Hit count: 542

Hi, using ASP.NET MVC 1.0 and I have a action that returns a JsonResult and I need to redirect another action that also returns a JsonResult action type.

The problem is the RedirectToAction() returns a RedirectToRouteResult class and seems there is no way to convert that to JsonResult class ?

This is the error I am getting; Error 124 Cannot implicitly convert type 'System.Web.Mvc.RedirectToRouteResult' to 'System.Web.Mvc.JsonResult'

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about asp.net-mvc-controllers