Using validator controls with checkboxes

When attempting to set the ControlToValidate property of any of the built-in validator controls (particularly CustomValidator) you’ll find you get the following runtime error: Control ‘agreeTermsCheckBox’ referenced by the ControlToValidate property of ‘agreeTermsRequiredTrue’ cannot be validated. In my case, I want to validate a checkbox for my website’s Terms and Conditions to ensure that it’s … More Using validator controls with checkboxes

Dependency Injection into Pages and UserControls using Unity

Edit (8 Nov 2008): Turns out… Not so much the async postbacks, and more to do with a FormView not having initialized it’s controls at the point in time in the page lifecycle (on PostBack only, after Page Init). This can be tested by using a quick watch on the protected Control.ChildControlsCreated property in the … More Dependency Injection into Pages and UserControls using Unity