Firstly, you should not be testing the Text of a TextBox to determine a state. If there are only two possible states then you should probably be using a Boolean. If there are multiple states then you should be using an enumeration.

As for your issue, you've show us the code and told us that it doesn't do what it's supposed to. So, what does happen?