Groups | Blog | Home
all groups > asp.net > march 2004 >

asp.net : Urgent Help on finding a word in asp:DropDownList



mae
3/15/2004 11:31:05 PM
Dear all,

I have a problem here. Suppose I have a asp:DropDownList in my aspx page as below :-

<asp:DropDownList id="Dropdownlist1" Runat="server"><asp:ListItem>apple</asp:ListItem><asp:ListItem>mike</asp:ListItem><asp:ListItem>michael</asp:ListItem><asp:ListItem>racheal</asp:ListItem><asp:ListItem>rose</asp:ListItem></asp:DropDownList>

When the page is load, I want to find a name in the dropdownlist, for example if I type 'r' it will point to 'racheal' first and if I continue to type 'a' it will point back to 'apple'.

What if I want the dropdownlist to continue find the word 'ra' key-in by user and point it to the value which starts with 'ra' in the dropdownlist ?

Please reply as soon as possible.

Thanks alot.


Cheers,
Martin Dechev
3/16/2004 1:55:58 PM
Hi, Mae

This is the behavior of the HTML element <select> in IE. No public standards
apply to this particular
behavior AFAIK. It is feature of the browser and may vary from browser to
browser.

Greetings
Martin
[quoted text, click to view]
Runat="server"><asp:ListItem>apple</asp:ListItem><asp:ListItem>mike</asp:Lis
tItem><asp:ListItem>michael</asp:ListItem><asp:ListItem>racheal</asp:ListIte
m><asp:ListItem>rose</asp:ListItem></asp:DropDownList>
[quoted text, click to view]
example if I type 'r' it will point to 'racheal' first and if I continue to
type 'a' it will point back to 'apple'.
[quoted text, click to view]

Ken Cox [Microsoft MVP]
3/16/2004 8:23:27 PM
You might want to investigate this free control:

Smart DropDownList

http://www.asp.net/ControlGallery/ControlDetail.aspx?Control=1967&tabindex=2

[quoted text, click to view]
AddThis Social Bookmark Button