ActionResult and ViewResult

-> ActionResult is an abstract class while ViewResult derives from ActionResult class. ActionResult has several derived classes like ViewResult, JsonResult, FileStreamResult and so on.

  • ViewResult -> Renders specific view to the response stream.
  • PartialViewResult -> Renders a specified partial view
  • JsonResult -> Serializes a given object to JSON format.
  • RedirectResult -> Performs an HTTP redirection to a specified URL.

Leave a Reply

Your email address will not be published. Required fields are marked *