title: How to pass parameter(email ID) to a c# function from Jquery Ajax call?
body: <p>I am trying to call a Web Method of service from a Jquery Ajax call.
  Method accepts 3 parameter from the front end and search for the record in the DB.</p>
  
  <p>I am not able to concatinate those 3 parameter properly in the Ajax call :</p>
  
  <p>The Web Method is :</p>
  
  <pre><code>public bool FindRecord(string Fname, string Lname, string Email) 
  {
      string SQL = "SELECT * FROM contactsSource WHERE (first_name ='" + Fname + "') AND (last_name = '" + Lname + "') AND (email_address_work = '" + Email +"')";
      OleDbDataReader reader = DataAccess.GetData(SQL);
      if (reader.HasRows)
      {
          return true;
      }
      else
      {
          return false;
      }
  }
  </code></pre>
  
  <p>and the Ajax call I am trying is :</p>
  
  <pre><code>   &lt;script type="text/javascript"&gt;
          $(document).ready(function() {
              $('#btnDownload').click(function() {
                  var Fname = $('#Fname').val();
                  var Lname = $('#Lname').val();
                  var email = $('#Email').val();
  
                  $.ajax({
                      type: "POST",
                      contentType: "application/json; charset=utf-8",
                      data: '{"Fname":"' + Fname + '", "Lname":"' + Lname + '", "Email":' + email + '}',
                      url: "WebService.asmx/FindRecord",
                      dataType: "json",
                      success: function(result) {
                          alert(result.d);
                      },
                      error: function(result) {
                          alert("Due to unexpected errors we were unable to load data");
                      }
                  });
                  //$('.secondary').show(500);
              });
          });    
  
      &lt;/script&gt;
  </code></pre>
  
  <p>But I am keep on getting 500 Internal Server error :</p>
  
  <pre><code>{"Message":"Invalid JSON primitive: (Email ID that I am passing).","StackTrace":" at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializePrimitiveObject()
  </code></pre>