WHAT IS THE DIFFERENCE BETWEEN ACTIONRESULT AND VIEWRESULT?

Manoj Bhatt

Total Post:154

Points:1086
Posted by  Manoj Bhatt
 738  View(s)
Ratings:
Rate this:
Hi Everyone,
What is the  major difference between ActionResult and ViewResult in MVC. Please can anyone give me a some striking differences.

Thank you.
  1. Anupam Mishra

    Post:135

    Points:949
    Re: What is the difference between ActionResult and ViewResult?

    ActionResult is an abstract class while ViewResult derives from the ActionResult class. ActionResult has several derived classes like ViewResult, JsonResult, FileStreamResult, and so on.
    ActionResult can be used to exploit polymorphism and dynamism. So if you are returning different types of views dynamically, ActionResult is the best thing. For more details you Click Here

      Modified On Feb-07-2016 11:30:46 PM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!