Dailycode.info

Short solution for short problems

No validation with the "Cancel" button

I was having a hard time with some forms that had control validation occuring. Especially when the "Cancel" button was pressed, the validation still occured. I was looking for a property on the button called autovalidate or something, but I looked over the CausesValidation property. If you set this to false, the validation will be ignored! Thank god! Found this here: http://stackoverflow.com/questions/1882523/how-to-skip-validating-after-clicking-on-a-forms-cancel-button