title: jQuery.validate.js NOT working when using type="button" for ajax in MVC
body: <p>I know there are lots of question similar to this but i am not getting exact solution to my situation in MVC so i am asking again.</p>
  
  <p>I am new to <code>MVC</code> and i am using <code>jQuery AJAX</code> to call controller method to insert data.</p>
  
  <p>AJAX function.</p>
  
  <pre><code>function btnLoginUser(btnClicked) {
        var $form = $(btnClicked).parents('form');
  
        $.ajax({
              type: "POST",
              url: "/Accueil/Login",
              data: $form.serialize(),
              error: function (xhr, status, error) {
              },
              success: function (response) {
              }
          });
          return false;
      }
  </code></pre>
  
  <p>My button in form in view.</p>
  
  <pre><code>&lt;input type="button" value="Se connecter" class="btn btn-success" onclick="btnLoginUser(this)" /&gt;
  </code></pre>
  
  <p>When i use this button with type="button" it make ajax call but jQuery validation stops working.</p>
  
  <p>BUT when i use <code>type="submit"</code> then validation starts but ajax stops working and page is refreshing.</p>
  
  <p>Button with <code>type="submit"</code>.</p>
  
  <pre><code>&lt;input type="submit" value="Se connecter" class="btn btn-success" /&gt;
  </code></pre>
  
  <p>So is there any way that both should work with validation and also AJAX to insert data without refreshing page ?</p>
  
  <p>Any help would be appreciated.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Javascript call.</p>
  
  <pre><code>$(document).ready(function () {
          $('#idUser').on('submit', function (e) {
              if (!e.isDefaultPrevented()) {
                  e.preventDefault();
                  // Your Ajax code
                  btnInsertUser(this);
  
              }
          })
      });
  </code></pre>
  
  <p>And button in form is.</p>
  
  <pre><code>&lt;input type="submit" value="S’inscrire" class="btn btn-success" onclick="javascript:return AcceptTermAndcondition();" /&gt;
  </code></pre>