On the first Astronomy Calculator for the Date of Easter, I decided to use data validation.  I re-read the chapter on validating user input in one of my ASP.NET books.  I decided to use both the RequiredFieldValidator and RangeValidator controls.

The RequiredFieldValidator control was straightforward to use.  I modified the sample to not use the Text property so the ErrorMessage text was displayed.  At first, I didn’t use the CssClass because the text displayed red but when I implemented on the production website, the text wasn’t red so I used this property.

The RangeValidator control was also straightforward once I corrected typed in the data range.

One issue I had was which the placement of the text.  I re-skimmed the chapter and found the property of Display.  I changed this to Dynamic and the formatting worked better.