Ive just stumbled across property on a text box and it sounds the ideal solution for my validation routine, however I have no idea how to take advantage of it.
How can I use said property to revert the changes if the validation fails?
I have searched Google to no avail.
Thanks
The
UndoActioncan only be used as a piece of information on how the undo stack is changed. To change the stack, use the Undo and Redo methods of the textbox.However, you should use the Validating event for validation. E.g. in combination with an
ErrorProvider. An example is provided on the MSDN page.