Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
public override void ApplyEditChanges()
{
TextBox _myBox = this.EditControl;
string value = _myBox.Text;
if (!IsValid(value))
{
_myBox.BackColor = System.Drawing.Color.Orange;
this.AddErrorValidator("Your entry is not a valid e-mail address!");
}
else
SetValue(value);
}
I've figured out that I could get hold of the control/textbox through the EditControl property.
Would this be the way to go?
protected override void SetupTextBox(TextBox inputControl) { base.SetupTextBox(inputControl); inputControl.Text = this.PropertyData.Value as string; _myBox = inputControl; }
The SetupTextBox method provided me with easy access to the textbox control created by the base class. In CMS RC3 this method has been removed from the PropertyTextBoxControlBase class (same goes for the SetupDropDownList method in PropertySelectControlBase). What is the reason for this?