Here's an idea. If it's a GUI application, then you may use 3 comboboxes and then give them values when the form load say for dates you can use the code in form load:
for(int i =1;i<=31;i++)
{
cbodate.Items.Add(i);
}
And then you may use
if else if
condition statement to check in the date of birth value, say you can impose a restriction if the user enters 31st of Feb using this conditional statement you may show a messagebox if the user enters a wrong date, or wrong month containing a wrong date say 31st april.
Now if it's an ASP.NET application, then my friend I may suggest you to use the same trick or use any validating ctrls available in the framework.
This is just another method of doing what you want to do but if you insist on using maskedtxtbx, then I have no suggestions on that..... or you can also use
DATETIMEPICKER
and set validations accordingly...
Thanks & regards,
Radix :-\
Do rate my answer if you find it helpful to some extent. Thank you.