Select Page
This entry has been published on 2012-07-06 and may be out of date.

Last Updated on 2012-07-06.

Scenario:

User types text into a TextBox, e.g. for searching in a table. With the TextChanged event, you can send a query to the database every time the user hits a key.

Problem:

You don’t know if the user has finished writing. If this is a huge table in your database, the select query can last a few seconds, and this is even not useful, when the search text hasn’t been written completely by the user.

Solution:

Have a look at this thread on StackOverflow. They use a timer to achieve a good workaround for this problem.