Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old February 12th, 2007, 03:33 PM
Authorized User
 
Join Date: Dec 2006
Location: , , .
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default Type Ahead Drop Down List

Hi,

I am trying to find out how to implement type ahead on Drop down lists in asp.net1.1 using C#.
By Type ahead i mean that when you type 'a' the drop down takes you to list starting with 'a' but if you type 'ab' the drop down takles you to 'b' rather than taking you to list starting with 'ab'.I have tried couple of java scripts but none of them is working.Here are couple of them..

http://aspalliance.com/775
http://www.aspnetpro.com/newslettera...200411bm_l.asp

But none of them works.
If anyone and especially java script guys know what i am talking about ,please help me out.

Thanks a lot for your time and help.
Kamal

  #2 (permalink)  
Old February 12th, 2007, 03:49 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Ok, let me know if I understand what you are tring to do. You want to create a dropdown that if the user types 'a' the dropdown list will display all items starting with a then if the user types 'b' (the dropdown text would now be 'ab') the list will change to display all data that begins with the letter b.

Is that correct?

If it is correct I must pose the question: Why would you want to do this? From a useability standpoint I would be extremel frustrated if a site employed this kind of functionality in dropdown boxes.

Consider that the list of all items starting with 'a' is 1500 items long and I want to select 'Apple' from the list well, with the proposed functionality, I would type a letter a then have to scroll until I found apple, instead of being able to type 'app' and have a much smaller list returned.

And I just skimmed that aspalliance article but it should be fairly easy to edit that .js file to only grab that last character of the dropdownlist.

================================================== =========
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
  #3 (permalink)  
Old February 12th, 2007, 03:58 PM
Authorized User
 
Join Date: Dec 2006
Location: , , .
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi
Thanks for looking into this.Actually what i want is if i type 'a' the drop down displays all items with 'a' but if i type 'ap' then drop down list shows list starting with 'ap' .The in built capabiltiy of drop down list is to show 'a' and then 'p' which is quite frustrating as you said.
I am very naive in Java script so i wouldnt know even if it is a small change.I have tried to implement that code but it doesnt work.It says in explorer dont with error.

Thanks for help
Kamal

  #4 (permalink)  
Old February 12th, 2007, 04:09 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Look into this:

http://www.mredkj.com/vbnet/AutoComp...pdownlist.html

I have used it in the past and it works fairly well.

================================================== =========
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
  #5 (permalink)  
Old February 12th, 2007, 04:14 PM
Authorized User
 
Join Date: Dec 2006
Location: , , .
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the code.I cant look into now as this website is blocked in our intranet.I will go home and test the code but one question ...Is this code in VB.Net? Will tell you tommorow if it worked or if i still need help.

Thanks a lot and Regards,
Kamal

  #6 (permalink)  
Old February 12th, 2007, 04:20 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Yes the code is in VB.

================================================== =========
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
  #7 (permalink)  
Old February 12th, 2007, 04:23 PM
Authorized User
 
Join Date: Dec 2006
Location: , , .
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok..so i will convert it into C# and i am sure i will have problems . I will have lots of questions tommorow.

So thanks a lot for your help...I really appreciate it...

Regards,
Kamal

  #8 (permalink)  
Old February 12th, 2007, 04:29 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Converting from VB to C# or vice versa is a trivial task. And the code on the above page is extremely simple and shouldnt be a problem converting to C#.

================================================== =========
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
  #9 (permalink)  
Old February 13th, 2007, 09:47 AM
Authorized User
 
Join Date: Dec 2006
Location: , , .
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
I tried your code but then i decided to create web custom control as my application is too big and have lots of web forms and each one of it has atleast 2 occurances of drop down list.The code now i am using is
http://stirtaputra.tripod.com/smartdropdownlist/

This is working very nicely except for the post back.On the postback my drop down needs to fetch data to other fields.But this smart dropdown doesnt work on the drop down.
Any suggestions will be helpful.

Thanks a lot
Kamal

  #10 (permalink)  
Old February 16th, 2007, 11:03 AM
Authorized User
 
Join Date: Dec 2006
Location: , , .
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can somebody help me in this.Pleasee....If you have any clue any website,any web control....Please let me know....

I have checked metabuilders
Progsdemo

None of them works because of postback feature.

Thanks
Kamal

 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting ahead of IDataReader? technimedia BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 13 July 31st, 2007 12:34 PM
drop down list values based on another drop down noor ASP.NET 1.0 and 1.1 Basics 3 July 5th, 2005 10:57 AM
Drop Down List mrideout BOOK: Beginning ASP.NET 1.0 6 March 18th, 2005 03:32 AM
Drop Down List Beginner123 VB How-To 2 March 7th, 2005 01:56 PM



All times are GMT -4. The time now is 03:42 AM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.