title: html returns as xml when calling webservice (asmx) in jquery
body: <p>I have a jquery block that does some ajax stuff like this: </p>
  
  <pre><code>    $.ajax({
      url: '/webservices/manager.asmx/addNew',
      type: "POST",
      dataType: "html",
      data: { id: Id, name: Name, dept: Dept, helpId: HelpId },
      success: function (data) {
          //append to the table
          $('#divManagers').append(data); 
      },
      error: function () {
          //console.log('error');
      }
  });
  </code></pre>
  
  <p>So it passes through just fine, asmx receives the data and I calculate stuff, then finally I respond with something similar to this:  </p>
  
  <pre><code>&lt;div id="divContainer"&gt;
           &lt;h2&gt;Manager Name&lt;/h2&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Now, even though I have my <code>dataType</code> set to <code>html</code> I get my response encased in an xml string: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;string xmlns="http://tempuri.org/"&gt;&amp;lt;div id=divContainer&amp;gt;&amp;lt;/h4&amp;gt;Manager&amp;nbsp;Name&amp;lt;/div&amp;gt;&lt;/string&gt;
  </code></pre>
  
  <p>and they all actually just gets appended to the page, the complete text, without rendering as actual html elements.</p>
  
  <p>What is going on please?</p>
  
  <p><strong>EDIT</strong>  </p>
  
  <p>I am just constructing the html in my asmx. something like </p>
  
  <pre><code>StringBuilder component = new StringBuilder();
  component.appendFormat("&lt;div id='divComponent'&gt;&lt;h2&gt;{0}&lt;/h2&gt;&lt;/div&gt;', managerDataRow["ManagerName"].ToString());
  return component.ToString();
  </code></pre>
  
  <p>My asmx is a seperate, proper asmx page, not a [webmethod] method inside a normal aspx page. Thanks.</p>
  
  <p><hr>
  <sup>if there are any difference between my actual output and returned result <strong>here</strong> it is because I edited it to make it short. thanks.</sup></p>