Caricare ComboBox

N

NowSeeSharp

Ciao a tutti,

ho un problema probabilmente banale ma che non riesco a risolvere

per caricare in modo statico una combobox di un valore chiave e un
valore che venga visualizzato

utilizzo il metodo:

combo.Items.Add

non mi consente però di aggiungere una chiave che potrei richiamare
come combo.ValueMember

come posso fare ?

in html il corrispettivo è

<select name="combo">
<option value="chiave">valore visualizzato</option>
...............

Grazie
 
G

Guest

Hi NowSeeSharp,

prova questo:

DropDownList1.Items.Add (nuovo ListItem (“uno„, “1„));
DropDownList1.Items.Add (nuovo ListItem (“due„, “2„));
DropDownList1.Items.Add (nuovo ListItem (“tre„, “3„));

BTW, se usate l'inglese, che penso sono richiesto, otterrete le risposte più
rapide.

Joe
 
B

Bruce Wood

Anche chi sono delle grupi in italiano:

microsoft.public.it.dotnet

e

microsoft.public.it.dotnet.csharp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top