Asp.Net MVC Action Results

  Total Views : 8068
  Comments : 1
  Keywords : What are the Action Results in Asp.Net MVC, Types of Action Results in Asp.Net MVC, Various types of action results in mvc

Here we will learn action results in mvc with examples and different type of action results available in mvc with examples.

Asp.Net MVC Action Results

An ActionResult in mvc is an Abstract class and ActionResult is return type of controller method. Each ActionResult return different type of result. If we want to display image in Webforms we need to create Imagehandler for it but in MVC we can use FileResult which is already built in method.


Whenever we create a empty controller in MVC we have default ActionResult method created with name Index and it returns View() but we do not have only Return View() option but various other also lets have a look at it.

Types of Action Results in Asp.Net MVC

Following are the list of action results available in mvc


  1. ContentResult
  2. EmptyResult
  3. FileResult
  4. JavaScriptResult
  5. JsonResult
  6. PartialViewResult
  7. RedirectResult
  8. RedirectToRouteResult
  9. ViewResult



It returns user defined content type


return Content("I its my content result");



It returns a result that does nothing


return new EmptyResult();



It returns binary file content to the response.




It return script that will be executed at client browser.


public JavaScriptResult Examplejavascript()


var value = "alert('its JavaScriptResult')";

return JavaScript(value);




It returns a serialized JSON object.


public JsonResult Examplejson()


List<string> mystring = newList<string>();



return Json(mystring, JsonRequestBehavior.AllowGet);




It returns a partial view to the response.


public PartialViewResult ExamplePartialView()


return PartialView("Login");




It will redirect to specific URI.


return Redirect("/Home/index");



It redirects to another action method.




It renders a view as a Web page.


return View("Index");

Each action result will perform different actions based on type of action result in mvc.

 Comments (1)

  • Rajesh Vhadlure tutlane registered profile image
    Rajesh Vhadlure   Reply

    very good and systematic explanation

     Aug 30, 2016

Leave a comment

  • Default Tutlane User