Question

I have an autocomplete extender on my ASP.NET page and have set the "EnableCaching" attribute to "true".

Based on some conditions I want to clear the autocomplete extender's cache (I am not referring to the data cache that I am using in my Autocomplete Web Service - I am talking about the client-side cache used by the Auto Complete Extender.)

One obvious solution would be to just set "EnableCaching" to false, but this would result in my Database suffering far too many queries.

Can this be done via javascript, or any other way for that matter?

Was it helpful?

Solution 2

Hi Yuriy and thanks for your response! I have not yet tested your solution as I managed to stumble upon the solution after playing around with my code for a bit.

The following line of JavaScript seemed to do the trick for me:

$find('AutoCompleteEx')._cache=null;

To those who need some extra explaining, 'AutoCompleteEx' is the value assigned to your autocomplete extender's "BehaviourID" property.

I hope this helps someone out there!

OTHER TIPS

Try this: $find("<%= Extender.ClientID %>")._cache = [];

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top