Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DropDownList control bug?
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
DropDownList control bug?
Divers
Thread ID:
01011165
Message ID:
01011165
Vues:
61
Hi All,

When I try to populate a dropdownlist control in C# in a web form during run time with
DropDownList1.Items.Add(new ListItem(somename, somevalue));
and create code in its SelectedIndexChanged event, the said event does not trigger. However, if I put ListItems in the dropdownlist control's items collection property during design time, its SelectedIndexChanged event fires. Am I doing something wrong when populating a dropdownlist control programmatically?

My workaround for this is I created a single item in the dropdownlist control's item collection properties during design time and then clear the dropdownlist's items during run time when I programmatically add items to it. Can I not do this workaround? I might be missing something here.
Répondre
Fil
Voir

Click here to load this message in the networking platform