Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Event doesn't trigger
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01226154
Message ID:
01226260
Views:
20
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform