Slow/lagging/stopping search mechanism using AJAX in a textbox everytime a keypress
<p>I created a webbapp using ASP.NET, C# and jQuery. The webapp will search a record in a database. Like for example in the main page, I will type a name of the record and it will automatically show all record with the same name. So basically, everytime I type a character in the textbox search it will automatically trigger an javascript function and will trigger a request to fetch the data.</p>

<pre><code>&lt;input size="40" id="searchTxt"  name="searchTxt" type="text"/&gt;
</code></pre>

<p>and below is the jQuery and javascript function</p>

<pre><code>$('searchTxt').bind('keyup', function() {
    var txt = $('#searchTxt').val();
    xmlhttp.open("POST","/Search/?srch="+txt,false);    
    xmlhttp.send();
    document.getElementById("Show").innerHTML=xmlhttp.responseText;
});
</code></pre>

<p>Is it possible to separate the searching in another thread or another process so that the typing in the search box is smooth and not lagging or stopping.</p>

<p>Please advise.</p>

<p>Many thanks.</p>
