Home > DeveloperSection > Forums > What is the difference between ActionResult and ViewResult?
Manoj Bhatt
Manoj Bhatt

Total Post:154

Posted on    February-07-2016 10:13 PM

 ASP.Net ASP.Net  Custom Controls  ASP.NET MVC 

 1 Reply(s)
 664  View(s)
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.

Anupam Mishra

Total Post:135

Posted on    February-07-2016 11:24 PM

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

Don't want to miss updates? Please click the below button!

Follow MindStick