Partial view updating another partial view issues
<p>I have a page which has a list of Students. The partial view which renders a list is called "StudentManager". The partial view which I use in a modal to create a new student is called "NewStudent".</p>

<p>I have a couple of issues going on with this controller code. For some reason, after I press submit on the "NewStudent" partial view,  every time afterwards that I refresh the page a new student is there without me going in and pressing submit... This is a problem.</p>

<p>Also, I have searched similar topics here on stack and I cannot seem to understand why return PartialView("StudentManager",db.Students.ToList()); will not automatically refresh my "StudentManager" view. 
This code is supposed to give me a list in one partial view, and another partial view is supposed to let me create a new list item and then tell the list partial view to update.</p>

<p>Controller:</p>

<pre><code>public ViewResult Index()
    {
            return View();
    }
public ActionResult StudentManager()
    {
        return PartialView(db.Students.ToList());
    }
public ActionResult NewStudent()
    {
    return PartialView();
    }
//
// POST: 
[HttpPost]
public ActionResult NewStudent(Student student)
{
    if (ModelState.IsValid)
    {
        db.Students.Add(student);
        db.SaveChanges();
        return RedirectToAction("Index");
    }
    return PartialView();
}
</code></pre>

<p>Index.cshtml:</p>

<pre><code>@Html.Action("StudentManager", "StudentController")
&lt;div class="modal modal-wide fade" id="myModal4" role="dialog"&gt;
    &lt;div class="modal-dialog"&gt;
        @Html.Action("NewStudent", "StudentController")
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>Here is the "NewStudent.cshtml" view:</p>

<pre><code>@model GunneryTracker.Models.Student
    &lt;fieldset&gt;
        &lt;div class="modal-content"&gt;
            &lt;div class="modal-header"&gt;
                &lt;button type="button" class="close" data-dismiss="modal"&gt;&amp;times;&lt;/button&gt;
                &lt;center&gt;
                    &lt;h4 class="modal-title"&gt;New Student&lt;/h4&gt;
                &lt;/center&gt;
            &lt;/div&gt;
            &lt;div class="modal-body"&gt;
                &lt;div class="col-md-12"&gt;
                    &lt;div class="clearfix"&gt;&lt;/div&gt;
                    &lt;div class="x_content"&gt;
                        &lt;br /&gt;
                        &lt;form class="form-horizontal form-label-left" &gt;
                            &lt;div class="form-group"&gt;
                                &lt;div class="col-md-6 col-sm-6 col-xs-12"&gt;
                                    &lt;label class="control-label col-md-2 col-sm-2 col-xs-12" style="margin-right:10px"&gt;Course&lt;/label&gt;
                                    &lt;div class="col-md-3  col-sm-3 col-xs-12"&gt;
                                        @Html.DropDownList("CourseID", null, "-- Select Course --", htmlAttributes: new { @class = "form-control" })
                                        @Html.ValidationMessageFor(model =&gt; model.CourseID, "", new { @class = "text-danger" })
                                    &lt;/div&gt;
                                    &lt;label class="control-label col-md-2 col-sm-2 col-xs-12" style="margin-right:10px"&gt;Location&lt;/label&gt;
                                    &lt;div class="col-md-3 col-sm-3 col-xs-12"&gt;
                                        @Html.DropDownList("LocationID", null, "-- Select Location--", htmlAttributes: new { @class = "form-control" })
                                        @Html.ValidationMessageFor(model =&gt; model.LocationID, "", new { @class = "text-danger" })
                                    &lt;/div&gt;
                                &lt;/div&gt;
                                &lt;div class="editor-label"&gt;
            @Html.LabelFor(model =&gt; model.FName)
        &lt;/div&gt;
        &lt;div class="editor-field"&gt;
            @Html.EditorFor(model =&gt; model.FName)
            @Html.ValidationMessageFor(model =&gt; model.FName)
        &lt;/div&gt;
        &lt;div class="editor-label"&gt;
            @Html.LabelFor(model =&gt; model.LName)
        &lt;/div&gt;
        &lt;div class="editor-field"&gt;
            @Html.EditorFor(model =&gt; model.LName)
            @Html.ValidationMessageFor(model =&gt; model.LName)
        &lt;/div&gt;
                            &lt;/div&gt;
                            &lt;br /&gt;
                            &lt;br /&gt;
                            &lt;div class="form-group"&gt;
                                &lt;center&gt;
                                    &lt;p&gt;
                                        &lt;input type="submit" value="Create" /&gt;
                                    &lt;/p&gt;
                                &lt;/center&gt;
                            &lt;/div&gt;
                        &lt;/form&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="modal-footer"&gt;
                &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Save&lt;/button&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/fieldset&gt;
</code></pre>

<p>Pardon the slouchy html... The prettyfication isnt completed...</p>