How to pass the textbox value in jquery autocomplete
<p>I'm using jquery autocomplete in some textboxes in my web application (.Net 3.5). My problem is the prefix text is always blank. The correct value won't be assigned to it.</p>

<pre><code>function TextBoxAutoComplete(scope, controlId, contextKeyId) {

var txtbox = null;
var flagValue;
if (scope) {
    txtbox = $('input[id$="' + controlId + '"]', scope);
} else {
    txtbox = $('input[id$="' + controlId + '"]', document);
}

var contextKeyValue = $('input[id$="' + contextKeyId + '"]', document).val();

$(txtbox).autocomplete("../Handlers/MiscHandler.ashx", {
    minChars: 0,
    extraParams: { prefixText: $(this).val(), count: '10', contextKey: contextKeyValue, flag: 'codePart' },
    selectFirst: false,
    width: 49
}).result(function(event, data, formatted) { // result is a separate function
    var dummy = new Object();
    dummy.value = data[1];
    dummy.text = data[0];
    var test = new Test(dummy);
});
}
</code></pre>

<p>I call the above method at document ready. Here the problem is I don't get the textbox value (currently typed text) when i pass it to the variable 'prifixText'
    <strong>prefixText: $(this).val()</strong></p>

<p>Can anyone please help me in solving this issue? Thanks</p>
