title: unable to update partial view using jquery ajax in mvc 4
body: <p>i'm trying to update partial view but couldn't update. i'm sharing the code I have done so far.</p>
  
  <p>Action:</p>
  
  <pre><code>public ActionResult AddReview([Bind(Include = "ReviewId,ProductId,ReviewerName,ReviewText,Rating,Time,Summary")]
              Review review, int? id)
          {
  
  
  
              var reviewsList = new List&lt;Review&gt;();
              reviewsList.Add(review);
  
              if (ModelState.IsValid)
              {
                  review.Time = DateTime.Now;
                  review.ProductId = id.Value;
                  db.Reviews.Add(review);
                  db.SaveChanges();
                  if (Request.IsAjaxRequest())
                  {
                      // return HttpNotFound();
  
                      return PartialView("_Reviews", reviewsList);
                  }
              }
  
  
  
              return HttpNotFound();
          }
  </code></pre>
  
  <p>this JQuery Code:</p>
  
  <pre><code>   $(function () {
      var ajaxFormSubmit = function () {
          var $form = $(this);
          var options = {
              url: $form.attr("action"),
              type: $form.attr("method"),
              data: $form.serialize()
          };
  
          $.ajax(options).done(function (data) {
              var $target = $($form.attr("data-consumer-target"));
              var $newHtml = $(data);
           //   $target.replaceWith($newHtml);
              $target.append($newHtml);
              $newHtml.effect("highlight");
              success: alert('Thanks for your review');
              $("#ajax-contact-form").find('input, textarea').val("");
  
  
          });
  
          return false;
      };
  
      $("form[data-consumer-ajax='true'").submit(ajaxFormSubmit);
  });
  </code></pre>
  
  <p>this is Partial View _Reviews:</p>
  
  <pre><code>@model IEnumerable&lt;ConsumerSimpleNew.Models.Entities.Review&gt;
  
  &lt;div id="reviews"&gt;
      @foreach (var item in Model)
      {
          &lt;h5&gt;
              &lt;span class="color"&gt; @Html.DisplayFor(modelitem =&gt; item.ReviewerName)&lt;/span&gt; - @item.Time.ToString("MMM dd-yyyy")
          &lt;/h5&gt;
  
          &lt;h6&gt;Summary - @Html.DisplayFor(modelitem =&gt; item.Summary)&lt;/h6&gt;
          &lt;h6&gt;Rating: @Html.DisplayFor(modelitem =&gt; item.Rating)&lt;/h6&gt;
          &lt;div class="std"&gt;@Html.DisplayFor(modelitem =&gt; item.ReviewText)&lt;/div&gt;
          &lt;hr /&gt;
      }
  &lt;/div&gt;
  </code></pre>
  
  <p>this is Details View:</p>
  
  <pre><code> @Html.Partial("_Reviews", Model.Reviews)
  
  
                              &lt;div class="form-add"&gt;
                                  &lt;h2&gt;Write Your Own Review&lt;/h2&gt;
  
                                  &lt;form method="post" action="@Url.Action("Details")"
                                        data-consumer-ajax="true" data-consumer-target="#reviews"&gt;
  
  
                                      @Html.AntiForgeryToken()
                                      @Html.ValidationSummary(true)
  
                                      &lt;fieldset&gt;
                                          &lt;h4&gt;You're reviewing: &lt;span class="color"&gt;@Model.Product.Name&lt;/span&gt;&lt;/h4&gt;
  
                                          &lt;span id="input-message-box"&gt;&lt;/span&gt;
  
                                          &lt;input type="hidden" name="validate_rating"
                                                 class="validate-rating" value=""&gt;&lt;ul class="form-list"&gt;
                                              &lt;li&gt;
                                                  &lt;label for="nickname_field" class="required"&gt;&lt;em&gt;*&lt;/em&gt;Name&lt;/label&gt;
                                                  &lt;div class="input-box"&gt;
                                                      @Html.TextBoxFor(modelitem =&gt; Model.Review.ReviewerName, new
                                                  {
                                                      @class = "input-text required-entry",
                                                      placeholder = "Write your name"
                                                  })
                                                      @Html.ValidationMessageFor(model =&gt; model.Review.ReviewerName)
  
                                                  &lt;/div&gt;
                                              &lt;/li&gt;
                                              &lt;li&gt;
                                                  &lt;label for="summary_field" class="required"&gt;&lt;em&gt;*&lt;/em&gt;Summary of Your Review&lt;/label&gt;
                                                  &lt;div class="input-box"&gt;
                                                      @Html.TextBoxFor(modelitem =&gt; Model.Review.Summary, new
                                                  {
                                                      @class = "input-text required-entry",
                                                      placeholder = "Write Summary"
                                                  })
                                                      @Html.ValidationMessageFor(model =&gt; model.Review.Summary)
  
  
                                                  &lt;/div&gt;
                                              &lt;/li&gt;
  
                                              &lt;li&gt;
                                                  &lt;label for="summary_field" class="required"&gt;&lt;em&gt;*&lt;/em&gt;Rating (out of 10)&lt;/label&gt;
                                                  &lt;div class="input-box"&gt;
                                                      @Html.TextBoxFor(modelitem =&gt; Model.Review.Rating, new
                                                  {
                                                      @class = "input-text required-entry",
                                                      placeholder = "Give Some Rating"
                                                  })
                                                      @Html.ValidationMessageFor(model =&gt; model.Review.Rating)
  
  
                                                  &lt;/div&gt;
                                              &lt;/li&gt;
                                              &lt;li&gt;
                                                  &lt;label for="review_field" class="required"&gt;&lt;em&gt;*&lt;/em&gt;Review&lt;/label&gt;
                                                  &lt;div class="input-box"&gt;
                                                      @Html.TextAreaFor(modelitem =&gt; Model.Review.ReviewText, new
                                                  {
                                                      cols = "15",
                                                      rows = "13",
                                                      @class = "required-entry",
                                                      placeholder = "Write your review..."
                                                  })
                                                      @Html.ValidationMessageFor(model =&gt; model.Review.ReviewText)
  
  
                                                  &lt;/div&gt;
                                              &lt;/li&gt;
                                          &lt;/ul&gt;
                                      &lt;/fieldset&gt;
                                      &lt;div class="buttons-set"&gt;
                                          &lt;input type="submit" title="Submit Review" class="button pull-right" value="Submit Review" /&gt;
                                      &lt;/div&gt;
                                  &lt;/form&gt;
  </code></pre>
  
  <p>I have used and searched for lot of possible solution but I was unable to get the finest solution for this thing. please help me with this, where i'm making the error.</p>