title: How to submit form with Bootstrap Validator
body: <p>I am using <a href="http://bootstrapvalidator.com/" rel="nofollow">http://bootstrapvalidator.com/</a> with visual studio in bootstrap asp.net project.
  Problem I am having that I can never get validate button to actually validate like it does in examples, it validates fine when I start typing into textbox, but never validates when I click on button following examples.</p>
  
  <p>Another issue is I don't know how to call my c# method which will get value from textbox after validation was successful, I can call my method on button click, but I want  it to happen just after validation was successful .</p>
  
  <p>What I am looking for is simple example how to make submit button validate fields and then call my c# method which will read values from inputs.</p>
  
  <p>I been unable find even single example online , and I dont know much about javascript.</p>
  
  <p>Here is some testing code I have</p>
  
  <pre><code> &lt;div class="form-group" id="nameEmail2"&gt;
          &lt;div class="form-group"&gt;
              &lt;label for="inputContactName" class="col-sm-5 control-label"&gt;Contact Name &lt;/label&gt;
              &lt;div class="col-sm-7"&gt;
                  &lt;input type="text" class="form-control" name="fullName1" id="TextBox1" placeholder="Contact Name" maxlength="50"/&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="form-group"&gt;
              &lt;label for="inputContactEmail" class="col-sm-5 control-label"&gt;Contact Email &lt;b&gt;*&lt;/b&gt;&lt;/label&gt;
              &lt;div class="col-sm-7"&gt;
                  &lt;input type="text" class="form-control" name="email1" id="TextBox2" placeholder="Contact Email" maxlength="50"/&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="form-group"&gt;
              &lt;div class="col-sm-5 col-sm-offset-3"&gt;
                  &lt;button type="submit" runat="server" onserverclick="submitValidate"  class="btn btn-default"&gt;Validate&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;/div&gt;
  
  
  
          &lt;script type="text/javascript"&gt;
              $(function () {
                  $('#nameEmail2').bootstrapValidator({
                      feedbackIcons: {
                          valid: 'glyphicon glyphicon-ok',
                          invalid: 'glyphicon glyphicon-remove',
                          validating: 'glyphicon glyphicon-refresh'
                      },                        
                      fields: {
                          fullName1: {
                              validators: {
                                  notEmpty: {
                                      // enabled is true, by default
                                      message: 'The full name is required and cannot be empty'
                                  },
                                  stringLength: {
                                      enabled: true,
                                      min: 8,
                                      max: 40,
                                      message: 'The full name must be more than 8 and less than 40 characters long'
                                  },
                                  regexp: {
                                      enabled: false,
                                      regexp: /^[a-zA-Z\s]+$/,
                                      message: 'The full name can only consist of alphabetical, number, and space'
                                  }
                              }
                          },
                          email1: {
                              validators: {
                                  emailAddress: {
                                      message: 'The value is not a valid email address'
                                  }
                              }
                          }
                      }
                  });
              });
          &lt;/script&gt;
  </code></pre>
  
  <p>I have removed most of asp objects and almost nothing runs at server any more, but that didnt help much here is my codebehind method</p>
  
  <pre><code>protected void submitValidate(object sender, EventArgs e) 
  {
      string contactName = Request.Form["fullName1"];
      string email = Request.Form["email1"];
      System.Diagnostics.Debug.Write("test",email);
  }
  </code></pre>