title: Validation asp.net with bootstrap
body: <p>I'm trying to make a validation form with asp.net/bootstrap. I'm testing it with one textbox.</p>
  
  <p>Currently this is my code:</p>
  
  <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %&gt;
  
  &lt;!DOCTYPE html&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head runat="server"&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;link href="Content/bootstrap.min.css" rel="stylesheet" /&gt;
      &lt;script src="Scripts/jquery-1.10.2.min.js"&gt;&lt;/script&gt;
  
  &lt;/head&gt;
  
    &lt;body&gt;
  
      &lt;form id="form1" runat="server"&gt;
          &lt;asp:TextBox runat="server" CssClass="form-control" ID="userNameTextBox" /&gt;
          &lt;input id="Submit1" type="submit" value="submit" /&gt;
      &lt;/form&gt;
  
      &lt;script type="text/javascript"&gt;
          $(document).ready(function() {
              $('#form1').formValidation({
                  framework: 'bootstrap',
                  icon: {
                      valid: 'glyphicon glyphicon-ok',
                      invalid: 'glyphicon glyphicon-remove',
                      validating: 'glyphicon glyphicon-refresh'
                  },
                  fields: {
                      &lt;%=userNameTextBox.UniqueID%&gt;: {
                      validators: {
                          notEmpty: {
                              message: 'The username is required and cannot be empty'
                          },
                          stringLength: {
                              min: 6,
                              max: 30,
                              message: 'The username must be more than 6 and less than 30 characters long'
                          },
                          regexp: {
                              regexp: /^[a-zA-Z0-9]+$/,
                              message: 'The username can only consist of alphabetical and number'
                          },
                          different: {
                              field: 'password',
                              message: 'The username and password cannot be the same as each other'
                          }
                      }
                  }
              }
          });
      });
      &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>But when I click the button nothing happens. What am I doing wrong?? Thankyou for helping!</p>