Can I fire a Text Changed Event for an asp.net Text Box before it loses focus?
Posted
by Xaisoft
on Stack Overflow
See other posts from Stack Overflow
or by Xaisoft
Published on 2009-11-10T05:26:23Z
Indexed on
2010/06/11
2:33 UTC
Read the original article
Hit count: 301
I have an asp.net TextBox in which I want to check if the text entered into the TextBox is > 0
. It works once I tab out or click out of the TextBox, but if I keep focus on the TextBox, it won't fire the Text Changed Event, so I have the following scenario, I want to enable something if and only if the TextBox.Text.Length = 0
. Now, if I put my caret in the TextBox and delete all the characters and then leave the caret in the TextBox so it still has focus and take my mouse and click a button, it will not do what it was supposed to do because it never fired the Text Changed Event. How would something like this be handled?
© Stack Overflow or respective owner