Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Drop down List box display
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00799061
Message ID:
00799154
Vues:
28
.NET controls have a thing called ViewState. It takes care of repopulating DropDown values and last selected values. You probably redefining all dropdowns on postback too and that is why they reset.
private void Page_Load()
{
   if (!this.IsPostBack)
   {
     //Code that defines the dropdown
   }
}
>Second, when the list is exposed, how do I allow keystrokes to be used? A to Z as well as Arrows Up and Down?

Set DropDownList.AutoPostBack property to false.

>I have a bunch of drop down lists. One has 500 items, most have around 50 or less. Anyway, how do I keep the item SELECTED in view on a postback?
>
>Second, when the list is exposed, how do I allow keystrokes to be used? A to Z as well as Arrows Up and Down?
>
>TIA
>
>__Stephen
- Jayesh
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform