title: function error() { [native code]}
body: <p>I have asp.net web site in c#.</p>
  
  <p>On Dropdownlist <code>Onchange()</code> event i'm calling this jquery function, which throws:</p>
  
  <pre><code>function error(){[native code]}
  
   &lt;script type="text/javascript"&gt;
       function GetDescription(a) {
           alert(a); // the dropdown item selected value
           var id = (!isNaN($(a).val())) ? parseInt($(a).val()) : 0;
           $.ajax({
               type: 'POST',
               contentType: "application/json; charset-8;",
               url: 'WT.aspx/GetRef',
               data: "{ 'id':'" + id + "'}",
               success: function (data) {
                   alert(data);
               },
               error: function (data) {
                   alert(Error);
               }
  
           });
  
       }
    &lt;/script&gt;
  </code></pre>
  
  <p></p>
  
  <p>WT.aspx/GetRef</p>
  
  <pre>
  
       [WebMethod]
       public string GetRef(int id)
       {
           DataTable dt = new DataTable();
           SqlParameter[] p = new SqlParameter[1];
           p[0] = new SqlParameter("@RefID", id);
           dt = dl.GetDataWithParameters("Sp_WT_GetRef", p);
  
           string data = dt.Rows[0]["Description"].ToString() +"|"+ dt.Rows[0]["PriceInUSD"].ToString();
  
           return data;
       }
  
  </pre>
  
  <blockquote>
    <p><a href="http://localhost:54576/resources/demos/style.css" rel="nofollow">http://localhost:54576/resources/demos/style.css</a> Failed to load
    resource: the server responded with a status of 404 (Not Found)
    <a href="http://localhost:54576/AutomobileWebApp/WT.aspx/GetRef" rel="nofollow">http://localhost:54576/AutomobileWebApp/WT.aspx/GetRef</a> Failed to load
    resource: the server responded with a status of 500 (Internal Server
    Error) <a href="http://localhost:54576/resources/demos/style.css" rel="nofollow">http://localhost:54576/resources/demos/style.css</a> Failed to load
    resource: the server responded with a status of 404 (Not Found)</p>
  </blockquote>