What is the difference between JSONResult and ActionResult?
can any one explain above the question
thank u
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rajeesh MenothPosted Nov 19, 2016, 3:02 AM
Milan PrajapatiPosted Nov 19, 2016, 6:45 AM
JsonResult is a subtype of ActionResult.
ActionResult is used when you want to return a view or file or even jsondata or redirect etc to be handled by a browser.
JsonResult is used when you want to return raw JSON data to be consumed by a client.
ActionResult is a basetype for several subtypes like JsonResult, ViewResult, PartialViewResult, RedirectResult, ContentResult.
Mukesh NayakPosted Nov 19, 2016, 3:16 AM