Solved

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

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

Expert Comment

by:lem2802
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now