You must understand that this is the nature of the web [not a bug]. Once the browser sends information to the server, everything stops. The server process the information, and sends it down to the browser, where all subsequent events after the one that posted to the server are erased.
You should use a javascript method for when the text changes, or don't have AutoPostBack on the textbox; that is what is firing the call to the server. Do your check in the button click event instead.
I haven't tested, but this option may also 'eat' your button click.
If you are only validating the entered data, you could also try using a validation control with clientside validation enabled.