title: Partialviewresult rending issues using ajax
body: <p>controler:</p>
  
  <pre><code> public PartialViewResult Create_Folder_Complete(string Folder_Name, string Parent_Folder)
      {
          //create folder on the server
          Create_Folder(Folder_Name, Parent_Folder);
          //Create the folder on DropBox
          CreateFolder_DropBox(Get_Folder_Full_Path(Parent_Folder, Folder_Name));
          return PartialView("_Folders_Structure", GetFolderStructure());
  
  
      }
  </code></pre>
  
  <p>PartialView:</p>
  
  <pre><code>    &lt;div id="displayme"&gt;
      &lt;div id="CurrentSelection" style="margin-top:2em; text-align:left; color:orange"&gt; &amp;nbsp;&lt;/div&gt;
      &lt;div class="panel panel-info"&gt;
          &lt;div class="panel-heading"&gt; &lt;b&gt;File management system&lt;/b&gt;&lt;/div&gt;
          &lt;div class="panel-body"&gt;
              &lt;div id="jstree_demo_div"&gt;&lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;script&gt;
          var $i = jQuery.noConflict();
      &lt;/script&gt;
  
  
      &lt;script&gt;
  
  
          $i('#jstree_demo_div').jstree(@Html.Raw(@ViewBag.folders));
  
          $i('#jstree_demo_div')
        .on('changed.jstree', function (e, data) {
            var i, j, r = [];
            for (i = 0, j = data.selected.length; i &lt; j; i++) {
                r.push(data.instance.get_node(data.selected[i]).text);
            }
            $('#CurrentSelection').html('Selected item: ' + r.join(', '));
  
  
            var result = $i('#jstree_demo_div').jstree(true).get_selected();
  
            $('#Parent_Folder').val(result);
            $('#Parent_Folder2').val(result);
  
  
  
        })
      &lt;/script&gt;
  
      &lt;div id="progress"&gt;
          &lt;img src="~/Content/images/ajax-loader.gif" /&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>View:</p>
  
  <pre><code> @model  AKCPA.Data.Models.FolderModel
  @{
      ViewBag.Title = "Folder Index";
      var folders = ViewBag.folders;
      Layout = "~/Views/Shared/_ScheduleSystemLayoutPage.cshtml";
  }
  
  &lt;h2&gt;File management system&lt;/h2&gt;
  
  &lt;link rel="stylesheet" href="../Scripts/JSTree/dist/themes/default/style.min.css" /&gt;
  &lt;script src="../Scripts/JSTree/dist/libs/jquery.js"&gt;&lt;/script&gt;
  &lt;script src="../Scripts/JSTree/dist/jstree.min.js"&gt;&lt;/script&gt;
  
  
  
          @using (Html.BeginForm("Upload", "File", FormMethod.Post, new { enctype = "multipart/form-data" }))
          {
  
              @Html.Hidden("Parent_Folder2")
                  &lt;div class="row"&gt;
                      &lt;div class="col-sm-3"&gt;
                          &lt;div class="input-group"&gt;
                              &lt;input type="file" id="fileUpload" data-val="true" data-val-required="please select a file" name="fileUpload" size="23" /&gt;
                              @Html.ValidationMessage("fileUpload")    
                              @*@Html.JQueryUI().Button("Upload a file")*@
  
  
                          &lt;/div&gt;&lt;!-- /input-group --&gt;
                      &lt;/div&gt;&lt;!-- /.col-sm-6 --&gt;
                      &lt;div class="col-sm-9"&gt;
                          &lt;div class="input-group"&gt;
  
                              @*@Html.JQueryUI().Button("Upload a file")*@
                              &lt;button class="btn btn-info" type="submit"&gt;Upload file&lt;/button&gt;
  
                          &lt;/div&gt;&lt;!-- /input-group --&gt;
                      &lt;/div&gt;&lt;!-- /.col-sm-6 --&gt;
                  &lt;/div&gt;
  
          }
  
      @using (Ajax.BeginForm("Create_Folder_Complete", "Folder",
      new AjaxOptions
      {
          HttpMethod = "GET",
          InsertionMode = InsertionMode.Replace,
          UpdateTargetId = "displayme",
          LoadingElementId = "progress"
      }
      ))
      {
  
          @Html.Hidden("Parent_Folder")
  
          &lt;div class="row"&gt;
              &lt;div class="col-sm-12"&gt;
                  &lt;div class="input-group"&gt;
                      &lt;span class="input-group-btn"&gt;
                          &lt;button class="btn btn-default" type="submit"&gt;Create a new folder&lt;/button&gt;
                      &lt;/span&gt;
  
                      &lt;input type="text" id="Folder_Name" data-val="true" data-val-required="please enter a folder name" name="Folder_Name" size="23" class="form-control" /&gt;
                      @Html.ValidationMessage("Folder_Name", "Folder Name is Mandatory Field!")
  
                  &lt;/div&gt;
  
              &lt;/div&gt;&lt;!-- /input-group --&gt;
          &lt;/div&gt;&lt;!-- /.col-sm-6 --&gt;
          //&lt;/div&gt;
  
      }
  &lt;div id="displayme"&gt;
      @Html.Partial("_folders_Structure")
  &lt;/div&gt;
  </code></pre>
  
  <p>Once i submit to call Create_Folder_Complete  instead of changing the div "displayme"  i just this result (See screenshot).
  <img src="https://i.stack.imgur.com/1t7OD.png" alt="enter image description here"></p>
  
  <p>But when i load the page at first calling the index page it shows everything correctly:
  <img src="https://i.stack.imgur.com/wNOC1.png" alt="enter image description here"></p>