Solved

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

Posted on 2007-04-11
5
965 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

739 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