title: $.ajax ReferenceError: data is not defined
body: <p>I am getting </p>
  
  <blockquote>
    <p>ReferenceError: data is not defined
    and</p>
  </blockquote>
  
  <pre><code>&gt;NetworkError: 500 Internal Server Error - http://localhost/WebApplication2/js/test.aspx"
  </code></pre>
  
  <p>But my aspx page is in right directory</p>
  
  <p>I did all these to remove internal server error :</p>
  
  <p><a href="http://pcsupport.about.com/od/findbyerrormessage/a/500servererror.htm" rel="nofollow noreferrer">http://pcsupport.about.com/od/findbyerrormessage/a/500servererror.htm</a></p>
  
  <p>Code is as per tutorial</p>
  
  <p>Index.html (Callback Data will be posted Here)</p>
  
  <pre><code>&lt;body&gt;
      &lt;input id="button" type="submit" value="Go" /&gt;
      &lt;div id="feedback"&gt;    &lt;/div&gt;
  
  
  &lt;/body&gt;
  </code></pre>
  
  <p><br/></p>
  
  <p>this is My Ajax method :</p>
  
  <pre><code>$('#button').click(function () {
      $.ajax({
          type: "POST",
          url: "test.aspx",
          data: {"name=" + name},
          success: function (data) {
              $("#feedback").html(data);
          }
      });
  });
  </code></pre>
  
  <p>test.aspx</p>
  
  <pre><code>&lt;form id="form1" runat="server"&gt;
  &lt;div&gt;
  &lt;%Response.Write(Request.Form["name"].ToString()); %&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>similar Posts :<br/></p>
  
  <p><a href="https://stackoverflow.com/questions/21803288/ajax-and-uncaught-referenceerror-data-is-not-defined">ajax and “Uncaught ReferenceError: data is not defined”</a><br/>
  <a href="https://stackoverflow.com/questions/15743483/ajax-and-uncaught-referenceerror-data-is-not-defined">$.ajax() and &quot;Uncaught ReferenceError: data is not defined&quot;</a><br/>
  <a href="https://stackoverflow.com/questions/12917797/ajax-data-uncaught-referenceerror-date-is-not-defined">Ajax data - Uncaught ReferenceError: date is not defined</a><br/></p>
  
  <p><strong>Edit</strong> : JSLint /JSHint /SharpLinter still not helping much for detecting syntax Error .I need some suggestion for syntax check</p>
  
  <p>there were issue of placing datatype parameter too.. it is not in my case .<br/></p>
  
  <p>I could not able to find something simple there..Please suggest</p>