Forums Últimos mensajes - Powered by IBM
 

Using a combo box on a C# asp.net web application

30/05/2005 - 07:33 por Eranga | Informe spam
Hello All,
I want to add a combo box to my C# asp.net web application so that I
can give the user the ability to pick an option. But combos are not
available there??
If I use a DropDownList I need to specify a database. But I dont need to
do this.
can someone please tell me how I can do this?


*** Sent via Developersdex http://www.developersdex.com ***
 

Leer las respuestas

#1 A.Poblacion
30/05/2005 - 08:14 | Informe spam
"Eranga" wrote in message
news:%
Hello All,
I want to add a combo box to my C# asp.net web application so that I
can give the user the ability to pick an option. But combos are not
available there??
If I use a DropDownList I need to specify a database. But I dont need to
do this.
can someone please tell me how I can do this?



The DropDownList *is* the ComboBox in Asp.Net. You don't have to specify
a database to use it. You can perfectly well load it manually with data by
adding values to its Items collection:

DropDownList1.Items.Clear();
DropDownList1.Items.Add("Option 1");
DropDownList1.Items.Add("Option 2");
...

Preguntas similares