Solved

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

Posted on 2007-04-11
5
964 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to repeat the data 4 30
vb.net convert long time to mm:ss 23 20
Need to sort columns in DataGridView 4 36
asp.net figure out error 3 18
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

679 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