Brett,
I would create a control that extends TextBox. In this control, I would
have a reset point which would indicate whether or not the text has changed
from the last reset point.
Then, what you can do is you can set the reset point. When it is set in
your control, you would store the text of the string somewhere in your
control. When you check to see if the control is "dirty", you would then
check the current text against the stored text. If they are different, then
they are dirty.
Of course, this only works if the data source you are comparing against
can be guaranteed to not have changed. The filters could still be the same,
but the data might not be, and the results, different.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Brett Romero" <ac*****@cygen.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Besides using a very long if statement and storing old text box values,
is there a way to see if text box values have changed since an event?
For example, say I have 8 textboxes when the form loads. They start
empty. The user types values into 2 of them and clicks search. Before
running the search, I want to make sure I don't waste cpu cycles
because perhaps the user didn't change any values, which means I don't
need to run the search. I can use results already in memory.
Thanks,
Brett