title: JavaScript not firing in ASP.NET
body: <pre><code> function isGoodEmail() {
              var email = document.getElementById("&lt;%=txtComapnyEmail.ClientID%&gt;").value;
              if (email == "Email") {
                  if (window.isValidEmail(email)) {
                      if (/(aol|gmail|yahoo|hotmail)\.com$/.test(email)) {
                          alert(' valid email, but not for this site.  No free service emails!');
                          return false;
                      }
                      return true;
                  }
                  return false;
              }
  </code></pre>
  
  <p>Button code: </p>
  
  <pre><code>&lt;asp:Button runat="server" class="button-orange" Text="Confirm and start my company page"
                                  ID="Companystart" OnClick="CompanystartClick" OnClientClick="isGoodEmail" /&gt;
  </code></pre>
  
  <p>I am calling the above JavaScript from the button, but it is not validating the email. Even if entered <code>gmail</code> it is accepted.</p>