protected void CheckControlValidationProperty (string name, string propertyName)
{
Control control = NamingContainer.FindControl (name);
PropertyDescriptor prop = null;
if (control == null)
throw new HttpException (String.Format ("Unable to find control id '{0}'.", name));
prop = BaseValidator.GetValidationProperty (control);
if (prop == null)
throw new HttpException (String.Format ("Unable to find ValidationProperty attribute '{0}' on control '{1}'", propertyName, name));
}