System.Web.UI.WebControls.BaseValidator.CheckControlValidationProperty C# (CSharp) Method

CheckControlValidationProperty() protected method

protected CheckControlValidationProperty ( string name, string propertyName ) : void
name string
propertyName string
return void
		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));
		}