I am working in VS2003 using vb.net.
I have a page that contains a textbox with autopostback set to True and validation code in the textchanged event.
I also have a cancel button on this page that clears all textboxes and disables all the controls on the page.
The problem is, if I populate the textbox and click the cancel button the validation in the textchanged event runs before the code in the button's click event. The textbox validation must run when any of the other buttons on the page are clicked and also when the user tabs off the textbox, but I want to bypass it when the cancel button is clicked.
Is there any way of getting hold of the button's id so that i can prevent the code in textchange event if the button is 'cancel'?
Jack