public DynamicFilteredTextBox()
        {
            _textBox = new TextBox();
            _textBox.CausesValidation = false;

            _required = new RequiredFieldValidator();
            _required.Display = ValidatorDisplay.Dynamic;
            _required.ErrorMessage = "erro, idiota";
            _required.ValidationGroup = "teste";
            _required.EnableClientScript = true;
            _required.Text = "*";
            _required.Enabled = false;

            _filteredExtender = new FilteredTextBoxExtender();

            this.Controls.Add(_textBox);
            this.Controls.Add(_required);
            this.Controls.Add(_filteredExtender);

            this._controlXml = new DynamicFilteredTextBoxXml();
        }
        public DynamicFilteredTextBox(DynamicFilteredTextBoxXml xml)
        {
            _textBox = new TextBox();
            _textBox.CausesValidation = false;

            _required = new RequiredFieldValidator();
            _required.Display = ValidatorDisplay.Dynamic;
            _required.EnableClientScript = true;
            _required.Text = "*";
            _required.Enabled = false;

            _filteredExtender = new FilteredTextBoxExtender();

            this.Controls.Add(_textBox);
            this.Controls.Add(_required);
            this.Controls.Add(_filteredExtender);

            this.ID = xml.Name;
            this.IsRequired = xml.IsRequired;
            this.ErrorMessage = xml.ErrorMessage;
            this.ValidationGroup = xml.ValidationGroup;
            if (xml.Width > 0)
                this.Width = new Unit(xml.Width);
            if (xml.Height > 0)
                this.Height = new Unit(xml.Height);
            if (xml.MaxLength > 0)
                this.MaxLength = xml.MaxLength;
            this.FilterMode = xml.FilterMode;
            this.FilterType = xml.FilterType;
            this.FilterInterval = xml.FilterInterval;
            this.ValidChars = xml.ValidChars;
            this.InvalidChars = xml.InvalidChars;
            _textBox.Text = xml.Text;

            this.Visible = xml.Visible;

            this._controlXml = xml;
        }