One thing to note, the solution above will not work if the user copies and pastes some data into one of the textboxes. You may need to play with the 'KeyPress' and 'Change' events if you want to support copy and paste.