Thursday, March 29, 2012

OnTextChanged and MaskedEdit

Hello. I noticed that once I'm using a MaskedEdit, the OnTextChanged event of my texbox isn't getting trapped anymore.

Basically, I have two textboxs linked to a MaskedEdit and a CalendarExtender, what I want to do is to do a validation once a date is selected, that if the first date is superior to the 2nd date then I can refuse the new date.

Even with "autopostback" enabled on the textbox, the OnTextChanged isn't called.

Thanks a lot.

Have you considered using a CompareValidator control with the ControlToCompare set to the first date and the ControlToValidate set to the second date?


Hello. No I haven't tried that yet. Can I do that even with a maskedEditValidator ? Right now my main problem is to trigger an event once the calendarExtender has been clicked. So how would you proceed to trigger the compareValidator ? Maybe I'm missing something obvious, I just have a few months of .net experience so far.

Thanks a lot for your time.

Pat

mikeworld:

Have you considered using a CompareValidator control with the ControlToCompare set to the first date and the ControlToValidate set to the second date?

0 comments:

Post a Comment