title: bootstrap validation for asp.net website
body: <p>I am using the following to validate the form filed but code doesn't seem to be working properly. What is wrong?</p>
  
  <p>When i click on sign in button then the appropriate error message is displayed but sign button is disabled automatically    </p>
  
  <p>For reference i use this link :
  <a href="http://www.jqueryscript.net/form/Powerful-Form-Validation-Plugin-For-jQuery-Bootstrap-3.html" rel="nofollow noreferrer">http://www.jqueryscript.net/form/Powerful-Form-Validation-Plugin-For-jQuery-Bootstrap-3.html</a></p>
  
  <p>My Code: </p>
  
  <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="login.aspx.cs" Inherits="login" %&gt;
  
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head runat="server"&gt;
      &lt;meta charset="UTF-8"&gt;
          &lt;title&gt;Prajakta Services | Log in&lt;/title&gt;
          &lt;meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'&gt;
          &lt;!-- bootstrap 3.0.2 --&gt;
          &lt;link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" /&gt;
          &lt;!-- font Awesome --&gt;
          &lt;link href="css/font-awesome.min.css" rel="stylesheet" type="text/css" /&gt;
  
          &lt;!-- Theme style --&gt;
          &lt;link href="css/AdminLTE.css" rel="stylesheet" type="text/css" /&gt;
  
          &lt;!-- jQuery 2.0.2 --&gt;
          &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"&gt;&lt;/script&gt;
  
          &lt;!-- Bootstrap --&gt;
          &lt;script src="js/bootstrap.min.js" type="text/javascript"&gt;&lt;/script&gt;
  
          &lt;!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --&gt;
          &lt;!-- WARNING: Respond.js doesn't work if you view the page via file:// --&gt;
          &lt;!--[if lt IE 9]&gt;
            &lt;script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"&gt;&lt;/script&gt;
            &lt;script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"&gt;&lt;/script&gt;
          &lt;![endif]--&gt;
  
      &lt;script type="text/javascript" language="javascript" src="js/jquery-1.10.2.min.js"&gt;&lt;/script&gt;
  
      &lt;script type="text/javascript" language="javascript" src="js/bootstrapValidator.js"&gt;&lt;/script&gt;
  
      &lt;link href="css/bootstrapValidator.css" rel="stylesheet" type="text/css" /&gt;
  
  
  &lt;script type="text/javascript"&gt;
  $(document).ready(function() {
      $('#form1').bootstrapValidator({
          //live: 'disabled',
          message: 'This value is not valid',
          feedbackIcons: {
              valid: 'glyphicon glyphicon-ok',
              //invalid: 'glyphicon glyphicon-remove',
              validating: 'glyphicon glyphicon-refresh'
          },
          fields: {
              txt_user_id: {
                  validators: {
                      notEmpty: {
                          message: 'The first name is required and cannot be empty'
                      }
                  }
              },
              txt_password: {
                  validators: {
                      notEmpty: {
                          message: 'The password is required and cannot be empty'
                      },
                      different: {
                          field: 'username',
                          message: 'The password cannot be the same as username'
                      }
                  }
              },
           }
      });
  });
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body class="bg-black"&gt;
      &lt;form id="form1" method="post" runat="server"&gt;
      &lt;div&gt;
      &lt;div class="form-box" id="login-box"&gt;
              &lt;div class="header"&gt;Sign In&lt;/div&gt;
  
                  &lt;asp:Label ID="lbl_msg" runat="server" Text=""&gt;&lt;/asp:Label&gt;
                  &lt;div class="body bg-gray"&gt;
                      &lt;div class="form-group"&gt;
                          &lt;asp:TextBox ID="txt_user_id" name="userid" runat="server" class="form-control" placeholder="User ID"&gt;&lt;/asp:TextBox&gt;
                      &lt;/div&gt;
                      &lt;div class="form-group"&gt;
                          &lt;asp:TextBox ID="txt_password" runat="server" name="pass" class="form-control" placeholder="Password" TextMode="Password"&gt;&lt;/asp:TextBox&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="footer"&gt;                                                               
                      &lt;asp:Button ID="btn_login" runat="server" Text="Login" 
                          class="btn bg-olive btn-sm" onclick="btn_login_Click"/&gt;
  
                      &lt;asp:Button ID="btn_cancel" runat="server" Text="Cancel" 
                          class="btn bg-olive btn-sm"/&gt;
  
                      &lt;p&gt;&lt;a href="#"&gt;I forgot my password&lt;/a&gt;&lt;br /&gt;
                      &lt;a href="register.aspx"&gt;Sign Up&lt;/a&gt;&lt;/p&gt;
                  &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;br /&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Please can you suggest the corrections needed in my code and thank you for your suggestions in advance</p>