Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

Autocomplete Extender

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Juan Romero - 03 Oct 2007 18:15 GMT
Hi guys,

I have an ajax autocomplete extender working fine but I would like to
populate the textbox with a different value from what the user selects. For
example:

User selects "CODE - Description of CODE here".
Textbox gets "CODE" only, not "CODE - Description of CODE here".

Thank you in advance!
Lloyd Sheen - 03 Oct 2007 19:18 GMT
> Hi guys,
>
[quoted text clipped - 6 lines]
>
> Thank you in advance!

The way that is normally done in a dropdown is to have a "Text" value which
is displayed and a "Value" value which holds the text to be used.  You would
have to get the source (available) for the toolkit and change the logic
since the webservice routine that is used returns a simple array of strings.
You would need an array of objects that contain a text/value pair.

I looked into the code but this is the first time I have looked at the code
for the extenders and my Javascript is not that great.

LS
Juan Romero - 03 Oct 2007 21:38 GMT
Thank you Lloyd.

I did the same thing and my Javascript is not that great either, lol....

Anyways for anyone else out there looking for this, I just found out that a
new version of the AjaxControlToolkit was just released a few days ago and
it includes a change to the AutoComplete to address this situation.
Basically, you are now able to pass key/value pairs. They still get passed
as a string but you can work with them through the OnClientItemSelected
event. Check it out!

>> Hi guys,
>>
[quoted text clipped - 18 lines]
>
> LS
Lloyd Sheen - 03 Oct 2007 22:30 GMT
> Thank you Lloyd.
>
[quoted text clipped - 29 lines]
>>
>> LS

Do you know which version that is.  I updated about a couple of weeks ago so
I may already have this version and should give it a try.

LS

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.