title: How to check duplicate email address without pressing button?
body: <p>I am developing a web application which should check for duplicate email address live without pressing a button. This checking has to be checked with database data. Please help me on this as I am new in javascript. </p>
  
  <p>Thanks a lot @Scandinave for helping me out. But when I am writing into the textbox it is not getting into the code file (i.e. not firing the method). here is what I am trying:</p>
  
  <pre><code>    $(document).ready(function () {
              //Listen for change event
              $("input[name='TextBox1']").keyup(function () {
                  //Get input fields values
                  var $email1 = $("input[name='TextBox1']").val();
                  //Make ajax request
                  $.ajax({
                      method: "POST",
                      url: "Default.aspx.cs/test",
                      data: { email1: $email1}
                  }).done(function (msg) {
                      //Check the JSON result send by backend
                      if (msg === "true") {
                          console.log("emails are identicals");
                      }
                  });
              });
          });
  </code></pre>