---
title: "What are the different types of ActionResult in ASP.NET MVC and when to use them?"  
description: "What are the different types of ActionResult in ASP.NET MVC and when to use them?"  
author: "Revati S Misra"  
published: 2023-06-01  
updated: 2023-06-02  
canonical: https://www.mindstick.com/forum/158588/what-are-the-different-types-of-actionresult-in-asp-dot-net-mvc-and-when-to-use-them  
category: "asp.net mvc"  
tags: ["asp.net", "asp.net mvc", "mvc"]  
reading_time: 3 minutes  

---

# What are the different types of ActionResult in ASP.NET MVC and when to use them?

What are the different types of [ActionResult](https://www.mindstick.com/forum/33961/what-is-the-difference-between-actionresult-and-viewresult) in [ASP.NET MVC](https://www.mindstick.com/forum/155798/what-is-caching-in-asp-dot-net-mvc) and when to use them?

## Replies

### Reply by Aryan Kumar

[ASP.NET](https://www.mindstick.com/articles/934/default-folders-available-inside-the-asp-dot-net-application-folder) [MVC](https://www.mindstick.com/forum/155803/define-cache-profile-in-mvc) has a number of different types of action results, each of which has its own purpose. Here is a brief overview of the most common types of action results:

- **ViewResult:** This is the most common type of action result, and it is used to render a view. The ViewResult class takes a view name as its constructor argument, and it will render the view with the specified name.
- **PartialViewResult:** This action result is similar to ViewResult, but it is used to render a partial view. Partial views are smaller pieces of HTML that can be reused in multiple views.
- **EmptyResult:** This action result does not return anything to the browser. It is useful for actions that do not need to return any data, such as actions that simply redirect the user to another page.
- **RedirectResult:** This action result redirects the user to a new page. The RedirectResult class takes a URL as its constructor argument, and it will redirect the user to the specified URL.
- **JsonResult:** This action result returns JSON data to the browser. The JsonResult class takes an object as its constructor argument, and it will serialize the object to JSON and return it to the browser.
- **ContentResult:** This action result returns a string of text to the browser. The ContentResult class takes a string as its constructor argument, and it will return the string to the browser.
- **FileResult:** This action result returns a file to the browser. The FileResult class takes a file path as its constructor argument, and it will return the file to the browser.

The best action result to use depends on the specific needs of the action. For example, if an action needs to render a view, then a ViewResult should be used. If an action needs to redirect the user to another page, then a RedirectResult should be used. And so on.

Here are some additional tips for choosing the right action result:

- If you are unsure which action result to use, then the ViewResult is a good default choice.
- If you need to return JSON data, then the JsonResult is the best choice.
- If you need to return a string of text, then the ContentResult is the best choice.
- If you need to return a file, then the FileResult is the best choice.

It is important to note that this is not an exhaustive list of all the different types of action results available in ASP.NET MVC. There are many other types of action results available, and the specific types of action results that are available may vary depending on the version of ASP.NET MVC that you are using.


---

Original Source: https://www.mindstick.com/forum/158588/what-are-the-different-types-of-actionresult-in-asp-dot-net-mvc-and-when-to-use-them

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
