Runtime Validation

  • Thread starter Thread starter brandonjack007
  • Start date Start date
B

brandonjack007

I have a webcontrol that extends from System.Web.UI.WebControls.
WebControl. It has 3 drop downlists for day, month, year. The day,
month, year then form the property called SelectedDate. The control
also has properties for MinimumDate , MaximumDate. During design time
while seting property I have validations to ensure
MinimumDate<SelectedDate<MaximumDate.
How can I achieve this validation during runtime when the User enters
a date which is greater than MinimumDate.
 
I imagine that each of the three drop downs will call a common function
to set the SelectedDate. At that point, I would check to see what the date
is, to see if it is within your range. If not, then throw an exception.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top