title: Second time partialview not loading to div via from .ajax() in MVC4
body: <p>I have issue loading partialview to div second time. I have checked previous posts in SO but non of them really helped me. So I am posting my issue here.</p>
  
  <p>index.cshtml</p>
  
  <pre><code> &lt;div id="DivEmailContainer" style="display:block" class="row"&gt;            
    &lt;/div&gt;
  </code></pre>
  
  <p>_EditEmail.cshtml</p>
  
  <pre><code>&lt;div class="row"&gt;
              &lt;div class="col-xs-12 col-sm-6 col-md-2 "&gt;
                  &lt;input type="submit" value="Save" class="btn btn-success width100per" /&gt;
              &lt;/div&gt;
  
  
  script type="text/javascript"&gt;
  
              $(function () {
               $("#frmEmail").validate({
                   rules: {
                          ...
           submitHandler: function (form) {
  
                      $.ajax({
                          url: 'PostEditEmail',
                          type: 'Post',
                          data: $(form).serialize(),
                          success: function (result) {
                              alert("In success");
                              $('#DivEmailContainer').html(result);
                          },
                          error: function (xhr, ajaxOptions, thrownError) {
                              alert(xhr.responseText);
                              alert(thrownError);
                          },
                          complete: function (xhr, textStatus) {
                              alert(xhr.responseText);
                              alert(textStatus);
                          }
                      });
                   }
              });
  </code></pre>
  
  <p>controller</p>
  
  <pre><code>public PartialViewResult PostEditEmail(string actiontype, FormCollection col)
          {
              var communicationLocation = string.Empty;
              ....
               return PartialView("_EditEmail", memberemail);
            }
  </code></pre>
  
  <p>First time partialview loading into <code>DivEmailContainer</code> to error. If submit again partialview  loading full post back. not even it is calling <code>submitHandler</code>.  </p>
  
  <p>Only thing I observed is 1st time submit <code>&lt;form post</code> was <code>/ContactInformation/GetEditEmail</code>but when I submit second time <code>&lt;form post</code> was <code>/ContactInformation/PostEditEmail</code>.</p>
  
  <p>What could be wrong?</p>
  
  <h2>update</h2>
  
  <p>second time Forloop scriptblock loading. May be it is issue with Forloop?</p>
  
  <p><code>@using (Html.BeginScriptContext())
  {
      Html.AddScriptBlock(
  </code></p>
  
  <h2>update</h2>
  
  <p>issue with forloop htmlhelper, not with ajax. secondtime script is not loading. @Russ Cam can help on this.</p>