title: Required field validator allows empty textbox to be submitted
body: <p>I have a required field validator for two textboxes for a submission form. My code for the form is below. For some odd reason it doesn't validate and allows the empty string to be entered into the database. The fields that are being entered are char but it doesn't submit it as null, just blank. </p>
  
  <p>Front-end</p>
  
  <pre><code>    &lt;td style="width: 315px; height: 22px;border-right: solid 1px #a32020;"&gt;
                      &lt;asp:TextBox ID="txtCompanyName" runat="server" BorderColor="#A32020" style ="border-right: solid 1px #a32020;" OnTextChanged="txtCompanyName_TextChanged" CausesValidation="True"&gt;&lt;/asp:TextBox&gt;
                  &amp;nbsp;&lt;asp:RequiredFieldValidator ID="rfvCoName" runat="server" ControlToValidate="txtCompanyName" Display="Dynamic" ErrorMessage="Please do not leave the Company Name blank." ValidationGroup="vgCompanyCreate"&gt;&lt;/asp:RequiredFieldValidator&gt;
                  &lt;/td&gt;
  </code></pre>
  
  <p>c#</p>
  
  <pre><code>    protected void btnSubmitCompany_Click(object sender, EventArgs e)
      {
          if (Page.IsValid)
          {
              // Creating a new connection to the database. 
              -- Insert Connection String --
  
              // Creating a new command to insert the input values into the database.
              SqlCommand SubmitCompanyCmd = new SqlCommand("Insert into Employer ([EmployerID], [Name], [Status], [Remarks], [DateLastModified], [LastModifiedBy]) Values(@inputCoID, @inputCoName, @inputCoStatus, @inputCoRemarks, @currentDateTime, 'Admin')", conn);
  
              SubmitCompanyCmd.Parameters.AddWithValue("@inputCoID", txtCompanyID.Text);
              SubmitCompanyCmd.Parameters.AddWithValue("@inputCoName", txtCompanyName.Text);
              SubmitCompanyCmd.Parameters.AddWithValue("@inputCoStatus", ddlCompanyStatus.Text);
              SubmitCompanyCmd.Parameters.AddWithValue("@inputCoRemarks", txtCompanyRemarks.Text);
              SubmitCompanyCmd.Parameters.AddWithValue("@currentDateTime", DateTime.Now);
  
              conn.Open();
              SubmitCompanyCmd.ExecuteNonQuery();
              conn.Close();
              lblSuccessMsg.Text = "Yay. xqc";
          }
  </code></pre>
  
  <p>edit: Ignore the "Insert connection string" part, the actual connection string works just fine as tested with other functions. </p>