DropDownList Input

M

Morris Neuman

Hi,

Currently in a dropdownlist, the input by the user is taken as the first
digit entry for the selection. i.e. if the user enters 5 the dropdownlist
selection list will first display entries starting with 5, then if the user
enters 7 the dropdownlist selection list will display entries starting with 7.

Using the above scenario, how can I get the dropdownlist selection to
display entries starting with 57?

Are there any examples or walkthroughs that you can reference for me?
 
N

Nathan Sokalski

I am assuming based on your question that your DropDownList contains the
values 0,1,2,3,4,5,6,7,8, and 9. If you want to do this without any buttons,
you will need to have a variable that gets appended to on the JavaScript
onchange event. If you want to use a button, use the JavaScript onclick
event of the button. If it is help in displaying the correct entries, you
will need to give a little more information. Good Luck!
 
M

Morris Neuman

I am not working with Java. Maybe someone else has a answer with a bit more
details.
--
Thanks
Morris


Nathan Sokalski said:
I am assuming based on your question that your DropDownList contains the
values 0,1,2,3,4,5,6,7,8, and 9. If you want to do this without any buttons,
you will need to have a variable that gets appended to on the JavaScript
onchange event. If you want to use a button, use the JavaScript onclick
event of the button. If it is help in displaying the correct entries, you
will need to give a little more information. Good Luck!
 
S

Steven Cheng

Hi Morris,

I think the things Nathan mentioned is use javascript(not java) to
implement a client script based component. Based on your requirement, it is
somewhat like an auto-complete dropdownlist. However, since a standard
dropdownlist (<select> html element) cannot remember the previous letters
you type, you may consider adding a textbox to hold the entire characters
user has typed.

ASP.NET ajax control toolkit contains a built-in auto-complete control, you
can have a look:

#AutoComplete Demonstration
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AutoComplete/AutoComplete
.aspx

And there are some other articles discussing on implement a custom
auto-complete control via client-script:


#An ASP.NET 2.0 AutoComplete DropDownList...
http://www.dotnetjohn.com/articles.aspx?articleid=215

#Autocomplete using jQuery, MVC, and JSon
http://farazt.blogspot.com/2008/10/autocomplete-using-jquery-mvc-and-json.ht
ml

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 
N

Nathan Sokalski

As Steven pointed out, it is not possible to do what you want without using
JavaScript in some way (whether it be simple basic code you write yourself
or AJAX). Also, as Steven suggested, you need to decide whether you want to
accomplish your goal using an extra TextBox or JavaScript that remembers
what value(s) were previously selected. I think you need to be clear about
exactly what you want your user interface to look like. Good Luck!
 
M

Morris Neuman

Thanks for the info. I am a novice and just learning the basics.

I am trying to implement the solution per
http://www.dotnetjohn.com/articles.aspx?articleid=132

From what I can understand from the article is that I need to create a vb
project with a Class file named KeySortDropDownList.vb. I downloaded the
project code to do that.

I am trying to add the custom control to my web page as outlined but don't
see how to add the dll to the tool box. When I right click on the tool box I
don't see any option to 'Add/Remove Items'.

"Create a webform, or use the default WebForm1.aspx. In design mode open the
tool box and right click. Select the 'Add/Remove Items' option. In the
resulting dialog box browse to the KeySortDropDownList.dll, press Select and
then OK. The control will then be added to the toolbox. Drag the control onto
your .aspx file. "

What am I doing wrong?
 
S

Steven Cheng

Hi Morris,

As for the "adding custom control in the toolbox", you can use the
following steps:

** open an ASP.NET web project

** open "Toolbox" and right click on the toolbox(blank area)

** In the context menu, choose "Choose Items..." item

** In the popup dialog, use "Browse..." button to find the assembly of your
custom web control. After you select your assembly, in the ListView above,
you can find the certain control class and check the option before it.

** click OK and the control should appear on the toolbox.

#How to add custom control in Visual Studio Toolbox.
http://dhavalupadhyaya.wordpress.com/2008/07/20/how-to-add-custom-control-in
-visual-studio-toolbox/


Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.








--------------------
 
S

Steven Cheng

Hi Morris,

Have you got any progress on this thread? If there is anything else need
help, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
--------------------
 
S

Steven Cheng

Thanks for your followup Morris,

I'm glad that you've got it working. In case there is any further question,
always feel free to post here.

Have a nice day!

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top