Archive for February, 2011

EPiServer custom property dropdown

February 18th, 2011

Some EPiServer developers still create their own custom property for the only purpose of having a simple dropdown (aka combobox / select list) for editors to choose from a predefined list.
If you only need a simple key/value dropdown, there’s no need to create a custom property – all you need is to configure it using appSettings in web.config.
(more…)

Control referenced by the ControlToValidate property cannot be validated

February 3rd, 2011

Form validation is common, but surprisingly, the ASP.NET built in validation controls don’t work with the CheckBox (or CheckBoxList) web controls!
If you specify the ControlToValidate attribute in a validator to the ID of a CheckBox (and ValidationGroup too) then you will receive the following exception:
Control [ID] referenced by the ControlToValidate property of [ID] cannot be validated.

(more…)