0

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.

dawsoad
  • 13
  • 4

1 Answers1

0

I found a descent workaround if anyone is interested.

http://www.aspforums.net/Threads/120948/ASPNet-AJAX-AutoCompleteExtender-Display-No-records-found-message-when-no-matches-found/

dawsoad
  • 13
  • 4