Dropdown list editable


I use Visual STudio 2008 and I want to create an editable dropdownlist.  
It must be possible to enter a value manually or to select a value in the dropdownlist. No check must be done between the entered value and the list of values in dropdown,and the entered value must not be added in the dropdownlist.

I hope you understand what I want.


Thnks for your help
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

anarki_jimbelSenior DeveloperCommented:
I believe all you need is to set comboboxstyle. In forms it's "DropDown", in ASP I can't remember now.
use ajax

it has

 <cc1:ListSearchExtender ID="item" runat="server" TargetControlID="dropdownlist" PromptCssClass="SearchPrompt" PromptText="" PromptPosition="Top">


AngieWillAuthor Commented:
Thanks for your help samsymon.
 But doesn't work with entered value not in the list.

I will try to clarify what I want to do:
I have a filter with a dropdownlist and a button. I would like to enter manually a value (if it possible in the dropdown) or selected a value in the list. The entered value can exist or not in the list...

AngieWillAuthor Commented:
I find my solution without ajax and ListSearchExtender or DropdownExtender.

This is my code:

in ascx:

<script type="text/javascript" language="javascript">
function DisplayText() {
        var textboxId = '<% = TextBox1.ClientID %>';
        var comboBoxId = '<% = drp.ClientID %>';
        document.getElementById(textboxId).value = document.getElementById(comboBoxId).value;

<asp:TextBox ID="TextBox1" runat="server" style="position:absolute" Width="50px"></asp:TextBox>                  
<asp:dropdownlist id="drp" runat="server" Width="70px" DataValueField="xcode" DataTextField="xode"></asp:dropdownlist>

in ascx.cs:

 if (!Page.IsPostBack)
                drp.Attributes.Add("onChange", "DisplayText();");

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AngieWillAuthor Commented:
see my last comment
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.