Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AutoCompleteExtender

Status
Not open for further replies.

tahirk

Programmer
Oct 24, 2005
47
GB
Hi,

I am using Visual Studio 2008 with the latest Ajax Control Toolkit, in particular the AutoCompleteExtender control.

I have successfully setup the AutoCompleteExtender to use a Web Service which queries an SQL 2005 database to retreive results. The Web Service is generic across several controls where I am using the ContextKey value to determine which set of auto complete values to pull back in a list.

So far so good..

What I want to do is to then update another textbox with the corresponding value, e.g. if you select the auto complete word "Hello" in the first textbox (the one associated to the AutoCompleteExtender), when the user picks the value, the other textbox (not associated to an extender) will display the corresponding value "World!".

I have tried out various solutions but I am not sure what is the correct way of going about this, short of rewriting the control or implementing lots of beskpoke Javascript functions I am pretty much stuck.

Is there a way of getting the AutoCompleteExtender to use server side callbacks for event handling? The Web Service is obviously limited being so remote to the main site so I need a way of integrating the AutoCompleteExtender into my code behind events etc (C#).

Cheers,

T
 
I imagine a javascript method would be the easiest method to implement (i.e. the onblur event could be used to select trhe corresponding value). I'd ask in the javascript forum if you get any problems implementing this method into your code.


-------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
 
Cheers Mark, I'll give that a method a go and see how I get on.
 
Managed to find a solution, the new build of the Ajax Control Toolkit includes the updated AutoCompleteExtender control.

I used the OnClientItemSelected event with some Javascript code to capture the selected value and then I am able to process some business logic based on this value i.e update other controls or trigger some secondry event.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top