Chapter 9. Validating Placeholder Controls
Before content is saved, it is often necessary to validate it to ensure some level of data integrity. It’s often necessary to look for empty fields, check for invalid date formats, or even compare values between two or more controls.
Typically web forms can’t be submitted until such validation checks have been passed. For example, when an author attempts to submit a form without filling in a mandatory field, a friendly error message appears on the screen. He or she will have to enter content into the field before the form can be submitted successfully.
Such validation techniques are common in regular web applications. However, for MCMS websites, validation, if done at all, is often secondary. Part of the reason lies in the fact that ASP.NET validation controls, which work great with controls in regular web forms, do not work with MCMS placeholder controls.
To get around this problem, we need to build our own controls...