---
title: "Returning partial view from controller"  
description: "Returning partial view from controller"  
author: "Sunil Singh"  
published: 2017-09-16  
updated: 2017-09-16  
canonical: https://www.mindstick.com/forum/34342/returning-partial-view-from-controller  
category: "c#"  
tags: ["asp.net mvc", "mvc", "mvc3", "mvc2", "mvc4"]  
reading_time: 1 minute  

---

# Returning partial view from controller

I want to return studentlist as a [partial view](https://www.mindstick.com/articles/1132/auto-refresh-partial-view-in-asp-dot-net-mvc). Here is my [index](https://www.mindstick.com/blog/198/index-in-sql-server) [method](https://www.mindstick.com/forum/166/webservice-method) [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii)

```
  public ActionResult Index(Student Model)       
{            using (var ctx = new School_Context())            {                ctx.Students.Add(Model);                ViewBag.msg = "Record Saved!!";                ctx.SaveChanges();                return PartialView("StudentList");            }        }
```

But I don’t know where the [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic) is? When I run this code it [shows](https://yourviews.mindstick.com/view/81380/new-york-violent-shooting-shows-people-are-not-safe-in-night-life) [error](https://yourviews.mindstick.com/view/88527/fixing-quickbooks-error-4120-reinstalling-vs-repairing) that view is not found.

## Replies

### Reply by Sushant Mishra

Check that your [partial](https://www.mindstick.com/blog/78/partial-class-in-dot-net) [view](https://yourviews.mindstick.com/view/84701/layoffs-in-google-india-2023-view) should be in shared folder and shared folder should be in views folder not in Home folder as shown in below screenshot.

![Returning partial view from controller](https://www.mindstick.com/mindstickforums/d5f8fe82-a70a-4d1c-a647-6cb87a3b25cc/images/7ae5cfa4-ad3f-4be8-8901-a15c80f28a6c.png)\

\

I hope your problem will be solved after reading this post.\

\

\


---

Original Source: https://www.mindstick.com/forum/34342/returning-partial-view-from-controller

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
