Monday, March 26, 2012

AJAX AutoCompleteExtender

Hi there everyone.

I have a AutoCompleteExtender working on my site, very nice little feature... But i would liek some information to extend it some.

Now i have another webservice that provides me with a list of Cities in the world. on of these elements may look like this:

<CityList>
<City>
<CityCode>LAX</CityCode>
<CityName>LosAngeles</CityName>
<StateCode>CA</StateCode>
<TravelPort>LosAngelesIntlArpt</TravelPort>
<CountryCode>US</CountryCode>
<CountryName>UnitedStates</CountryName>
</City>
etc

Now currently i am pulling the <CityCode> element and generating a string[] that my web service then sends out to the AutoCompleteExtender.

Couple of things i would like to see happen here and would like some information on:

1) Say my user search for "Los" and LosAngeles shows up in the Entender. They click it. At this point i would like to add LAX as their selected value. Similar to how a DropDownMenu has a SelectedItem.Value and .Text... How do i get this done?

2) i would also like to see the reverse of that and have them still be able to searc h for LAX and LosAngele show up...

There has to be a way to do this right?

Nugs

Hi,

I think this link will help you out :

How to : Use a Key Value Pair in your AutoCompleteExtender ( updated again... )

Thanks

No comments:

Post a Comment