Solved

How do I add a ComboBox to my ASP.NET 2.0 page ?  VB.NET ComboBox

Posted on 2007-04-11
5
962 Views
Last Modified: 2013-11-07
VB.NET, ASP.NET.  .NET 2.0

I guess this is an easy beginner question.  I can't find the ComboBox control.

How do I drop a ComboBox control to my ASP.NET page (with a VB.NET code behind page).  I tried going to chose Toolbox Items and all ComboBox controls were checked, but I don't see it.

Or what properites can make a DropDownList work like a ComboBox (so I can type in my own value)
0
Comment
Question by:Epicmanagement
5 Comments
 
LVL 12

Expert Comment

by:Pra4444
ID: 18893355
This is how you add values at run time...

DropDownList1.items.add("anyvalue")

if you know the values before then and its not gonna change then,
<asp:dropdownlist id="DropDownList1" runat="server"  Width="97px" Font-Bold="true">
                                          <asp:ListItem Value="1">text1</asp:ListItem>
                                          <asp:ListItem Value="2">text2</asp:ListItem>
                                          <asp:ListItem Value="3">text3</asp:ListItem>
                                    </asp:dropdownlist></td>
0
 
LVL 7

Expert Comment

by:MHenry
ID: 18893360
Did you try the drop down list in the toolbox? You can assign a label and a value.

Should work for you.

Best,
MH
0
 
LVL 18

Expert Comment

by:Elvio Lujan
ID: 18893363
the name of combobox in the toolbox is dropdownlist its the same
0
 

Author Comment

by:Epicmanagement
ID: 18894279
NO they are not the same.

It a Windows Application a Combo Box also lets you type in your own value so you don't have to just chose from the values in a dropdownlist.

I need the user to be able to also enter in a value that is not in the DropDown
0
 
LVL 35

Accepted Solution

by:
mrichmon earned 500 total points
ID: 18894707
There is no such thing.  You must write one or purchase one.

We wrote our own (C#)

Here is code for one as well (also in C#)
http://dotnetslackers.com/articles/aspnet/Custom_ASPNET_ComboxBox_Control.aspx

Here is another:
http://www.metabuilders.com/Tools/ComboBox.aspx
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB.Net - TypeInitializer Error 25 26
imap mails 1 22
Deploying to Azure 3 28
Get number of Files in Directory and Sub Directories 2 40
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question