title: Sencha Touch Error You're trying to decode an invalid JSON String HTML page returns in ASP.NET
body: <p>When I try to post JSON string to client side, I have the error below.</p>
  
  <pre><code>Uncaught Error: You're trying to decode an invalid JSON String: 
  
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;&lt;title&gt;
  
  &lt;/title&gt;&lt;/head&gt;
  &lt;body&gt;
      &lt;form method="post" action="WebForm1.aspx" id="form1"&gt;
  &lt;div class="aspNetHidden"&gt;
  &lt;input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE2MTY2ODcyMjlkZDU/UqTLS4JCyWg8lH2WKg+TKxlfMLv46f+TlE5HbZ5k" /&gt;
  &lt;/div&gt;
  
      &lt;div&gt;
  
      &lt;/div&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>It returns all HTML page. My server side code is like this:</p>
  
  <pre><code>var httpWebRequest = (HttpWebRequest)WebRequest.Create("http://localhost:59145/My%20Application.app/webapp/index.html");
          httpWebRequest.ContentType = "application/json";
          httpWebRequest.Method = "POST";
          string json = "{ \"myresultlist\": [ {\"uname\": \"1\",\"pass\": \"anne\" }, { \"uname\": \"2\", \"pass\": \"jack\" }, {\"uname\": \"3\", \"pass\": \"Tom\" } ]}";
  
  
          httpWebRequest.ContentLength = json.Length;
  
          using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
          {
  
              streamWriter.Write(json);
              streamWriter.Flush();
              streamWriter.Close();
  
          }
  </code></pre>
  
  <p>Anybody has any idea? How can I send only JSON string to client?</p>