title: Bind Multi Line HTML content from JQuery Ajax response
body: <p>This is the part of my html code that binds to the view using a Model object.</p>
  
  <pre><code>@if (Model.Comments != null)
              {
                  @foreach (var thread in Model.Comments.Threads)
                  {
                      &lt;div class="comment-wrap"&gt;
                          &lt;div class="comment-head"&gt;
                              &lt;div class="subsciber-user" style="background: #DDEFC5"&gt;@thread.UserName.Substring(0, 2).ToUpper()&lt;/div&gt; @thread.UserName &lt;span&gt;@thread.PostedDate.ToString("dd MMM yyyy")&lt;/span&gt;
                              &lt;div class="edit-comment"&gt;&lt;img class="comment-edit-img" src="~/images/edit-task.svg"&gt;&lt;/div&gt;
                          &lt;/div&gt;
                          &lt;div class="clearfix"&gt;&lt;/div&gt;
                          &lt;div class="comment-content"&gt;
                              @thread.Content
                          &lt;/div&gt;
                          @if (thread.Attachment != null)
                          {
  
                              &lt;div class="comment-attachment"&gt;
                                  &lt;div class="ca-head"&gt;@thread.Attachment.Count() Attachments&lt;i&gt;&lt;img class="c-download" src="~/images/download.svg" alt="" /&gt;&lt;/i&gt;&lt;/div&gt;
                                  &lt;div class="ca-tiles"&gt;
                                      @foreach (var item in thread.Attachment)
                                      {
  
                                          &lt;span&gt;&lt;img src="@item.AttachmentUrl" alt="Smiley face"&gt;&lt;/span&gt;
  
                                      }
                                  &lt;/div&gt;
                              &lt;/div&gt;
  
                          }
                      &lt;/div&gt;
  
                  }
              }
  </code></pre>
  
  <p>My requirement is I want to bind this HTML from a jquery Ajax Success. for that, I created an Ajax call.</p>
  
  <pre><code> var val1 = $('#TaskId').val();
      @*$(document).ready(function () {
          $.ajax({
              url: '/Task/GetTaskComments',
              data: { id: val1},
              dataType: "json",
              success: function (comments) {
  
              // here i neeed to bind this Html block using each loop,
              //  here we are getting the same response that we are getting Model.Comments in the above code as json 
              }
          });
      }); 
  </code></pre>
  
  <p>I want to append the looped Html content from ajax success inside my </p>
  
  <pre><code> &lt;div class="bindComments"&gt;
  
    &lt;/div&gt;
  </code></pre>