I am making use of the AutoCompleteExtender and need know how to handle the scenario when the PageMethod has no data to return. I am currently making use of 'OnClientPopulating' and 'OnClientPopulated' In the 'OnclientPopulating' I am doing the following:
function suggestionListPopulating(source, e) {
var textboxControl = $(source.get_element());
textboxControl.css('background', '#FFF url(images/loading3.gif)no-repeat right');
}
In the 'OnclientPopulated' I am doing the following:
function suggestionListPopulated(source, e) {
var textboxControl = $(source.get_element());
textboxControl.css('background-image', 'none');
}
Of course, since no data is being returned in certain; which is fine and correct, the 'OnClientPopulated' event is never firing, thus leaving a background image in my textbox.
Is there a way to clear the texbox background if the textbox control is not populated? Meaning a list never pop-ups to select from.