The ActionResult in asp.net mvc is an Abstract class and ActionResult is return type of controller method. Each ActionResult return different type of result depending upon the condition. If we want to display image in Webforms then we need to create Imagehandler for this but in Asp.net MVC we can use FileResult which is already built in method.
Whenever we create an empty controller in MVC we have by default ActionResult method created with name Index and which returns View() but we do not have only Return View() option but also various other options.
Types of Action Results in Asp.Net MVC
1. ContentResult
2. EmptyResult
3. FileResult
4. JavaScriptResult
5. JsonResult
6. PartialViewResult
7. RedirectResult
8. RedirectToRouteResult
9. ViewResult
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
The ActionResult in asp.net mvc is an Abstract class and ActionResult is return type of controller method. Each ActionResult return different type of result depending upon the condition. If we want to display image in Webforms then we need to create Imagehandler for this but in Asp.net MVC we can use FileResult which is already built in method.
ActionResult is the base class for all the result type action method.
Whenever we create an empty controller in MVC we have by default ActionResult method created with name Index and which returns View() but we do not have only Return View() option but also various other options.
Types of Action Results in Asp.Net MVC
1. ContentResult
2. EmptyResult
3. FileResult
4. JavaScriptResult
5. JsonResult
6. PartialViewResult
7. RedirectResult
8. RedirectToRouteResult
9. ViewResult