I have a function that is being called when the user is typing in a search box. I want to wait for the user to finish typing before I actually execute the function. I know how to easily accomplish this in JavaScript with timeouts, but how would I go about doing the same thing in C#? Also, how long should I wait before I assume the user is done typing? 100ms?
Share
Set a timer for the desired delay interval. Start the timer on the key up event. If the timer trips you stop the timer and run your search.
100ms is NOT a good interval, though!! That’s about 100wpm even if the typing is absolutely even.