title: calling asmx service using jquery ajax asp.net 4.0
body: <p>I'm trying to call a sample asmx service using jquery, here is the jquery code</p>
  
  <pre><code>$.ajax({
              type: "POST",
              url: "/Services/Tasks.asmx/HelloWorld",
              data: "{}",
              dataType: "json",
              contentType: "application/xml; charset=utf-8",
              success: function (data) {                   
                  alert(data);                    
              }
          });
  </code></pre>
  
  <p>This is not showing any message,code is in asp.net 4.0, 
  Am I missing any thing? </p>
  
  <p>Edit - I changed the dataType to xml, now success function is working it return following xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;string xmlns="http://tempuri.org/"&gt;Hello World&lt;/string&gt;
  </code></pre>
  
  <p>I'm using following code to parse xml data and it is showing null in alert</p>
  
  <pre><code>success: function (data) {
      edata = $(data).find("string").html();
      alert(data);
  }
  </code></pre>