In this article we will explain how to use Html.RenderAction() to return partial view from controller action in mvc or how to return and render partial view from controller action in mvc with example.


Asp.Net MVC RenderAction method is use to displaying data in the partial view is independent from corresponding view model. For example:  In a blog to show tag or category list on each and every page, we would like to use RenderAction method since the list of category is populated by the different model.

  • Let’s see a demonstration example of Html.RenderAction() method 


    Layout = null;
<!DOCTYPE html>
    <meta name="viewport" content="width=device-width" />
        @{Html.RenderAction("CategoryList", "Home");}


@model List<Tutorials.Category>
<link href=""rel="stylesheet" />
<script src=""></script>
<script src="~/Scripts/jquery-1.8.2.min.js"></script>
<div class="table-responsive" style="width:500px;">
    <table class="table">
                <th>Category Name</th>
                <th>Created On</th>                
            @foreach(var item in Model)



using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Tutorials.Controllers
    public class HomeController : Controller
    {                public ActionResult Index()
            return View();
        public ActionResult CategoryList()
            ArticleEntities db=new ArticleEntities ();
            return PartialView("CategoryList", db.Category.ToList());


 use RenderAction method in mvc to render partial view

I hope it will help to you.

Leave a comment

Make sure you enter the (*) required information where indicated. HTML code is not allowed.

You may also like