How do I pass any validation control to a method?
<p>I am creating a webform using ASP.NET and C#.  I created a method that posts an error message which is picked up by the Validation Summary control.  </p>

<pre><code>protected void PostErrorToCusVal(ref System.Web.UI.WebControls.CustomValidator ErrorObj, string ErrHead, string ErrMsg) {
  ErrorObj.ErrorMessage = "*SomeHTML/CSS*" + ErrHead + "*SomeHTML/CSS*" + ErrMsg + "*SomeHTML/CSS*";
}
</code></pre>

<p>I am having trouble passing anything other than a CustomValidator control to it.  I want to be able to pass any validation control to it and set the ErrorMessage property.  I tried using using BaseValidator and casting, but that wouldn't work.  Is it possible for this to be done?</p>

<p>Thanks,
Ozzy</p>
