skip to content »

Requiredfieldvalidator not validating

This is nice because it prevents you from having to do any fancy data sorting tricks or manual code behind additions of List Items.

The Initial Value property tells the validator what the state of the targeted control was at page load, so that the control is valid if it has data in it and its not equal to the initial value specified.Typically when I’m working with Drop Down Lists on my web pages, I like to add a “Select…” option to the list to prompt the user for a value.I could always specify a default value when loading the page, but more often than not it adds to the confusion for my end users.Validator Enable(val, enable) Takes a client-validator and a Boolean value. Being disabled will stop it from evaluating and it will always appear valid.Validator Hookup Control(control, val) Takes an input HTML element and a client-validator.Set this variable to False to turn off validation programmatically.isvalid Boolean property This is a property on each client validator indicating whether it is currently valid.

Page_Validation Summaries Array of elements This is an array containing all of the validation summaries on the page.

Page_Validators Array of elements This is an array containing all of the validators on the page.

Page_Validation Active Boolean variable Indicates whether validation should take place.

So the basic Drop Down List looks like this: One quick note, which I had discovered along the way.

The Append Data Bound Items property will take any statically created List Items you have in the control and bind them to the Drop Down List before your databound elements are added.

Page_Is Valid Boolean variable Indicates whether the page is currently valid.