title: Adding RequiredFieldValidator runtime
body: <p>I have a ASP.NET usercontrol ( a sign-up form ), and I need to add a requiredFieldValidator runtime. However, it's not working.
  Here is how I add the validator.</p>
  
  <pre><code>System.Web.UI.WebControls.RequiredFieldValidator nameValidator = new System.Web.UI.WebControls.RequiredFieldValidator();
  nameValidator.ControlToValidate = "SignUpName";
  nameValidator.ErrorMessage = "You must provide your name";
  nameValidator.ID = "nameValidator";
  nameValidator.Display = ValidatorDisplay.Dynamic;
  this.Page.Validators.Add(nameValidator);
  </code></pre>
  
  <p>What am I missing?</p>
  
  <p>-------- EDIT ---------</p>
  
  <p>I never found a solution for this. I achieved my goal by using a CustomValidator and doing all the validation manually.</p>