Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Event doesn't trigger
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01226154
Message ID:
01226260
Vues:
22
Hi Luis,

I have found that sometimes, for some reason the IDE "loses" the event wire-up in the code behind. Two things I know of to start looking are to

1) Check the code behind to make sure the event is wired up. You should have a statement in the form's InitializeComponent() method that looks like:
this.YourDropDown.SelectedIndexChanged += new System.EventHandler(this.YourDropDown_SelectedIndexChanged);
2) Save your code in the SelectedIndexChanged method, remove the method from the control and recreate it to get the IDE to recreate the event wire up.

Bill

>Hi Everybody, I'm having a problem with an event that doesn't trigger,
>I drop a DropDownList in my form, lets say "MyDropDown", double click on it
>to create the MyDropDown_SelectedIndexChanged event, so far so good, put some code there like MessageBox.Show("Hello world.") and when I run the page and select a value from the DropDown the event doesn't trigger, what can it be?
>
>Any help would be appreciated, thanks.
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform