title: Enable RequiredFieldValidator if TextBox is not empty
body: <p>can you help me with this simple problem of mine in asp.net,</p>
  
  <p>I have 3 textboxes; Txt1 Txt2 txt3</p>
  
  <p>If txt1 is not empty, txt2 and txt3 requiredvalidator should be enabled.
  if txt1 is empty, txt2 and txt3 requiredvalidator should not be enabled,</p>
  
  <p>Here's the requirement, once txt1 has a value, txt2 and txt3 should be a required field.</p>
  
  <p>can someone help me with this??</p>
  
  <p>Thank you so much.</p>
  
  <hr>
  
  <p>Can somebody check this code for me? THANK YOU so much</p>
  
  <pre><code>&lt;script type="text/javascript" language="javascript"&gt;
      function FatherClientValidate(oSrc, args) {
          var textBox = document.getElementById('&lt;%=FatherName.ClientID%&gt;');
          if (textBox.value != '') {
  
              var ctrlid = oSrc.id;
              var validatorid = document.getElementById(ctrlid);
              ctrlid = validatorid.controltovalidate;
              document.getElementById(ctrlid).style.backgroundColor = "#ff0000";
              args.IsValid = true;
          }
          else {
              var ctrlid = oSrc.id;
              var validatorid = document.getElementById(ctrlid);
              ctrlid = validatorid.controltovalidate;
              document.getElementById(ctrlid).style.backgroundColor = "White";
              args.IsValid = false;
          }
      }
  &lt;/script&gt;
  </code></pre>