SelectedIndexChanged

J

Jon Cosby

How does the "SelectedIndexChanged" event work on a dropdown list? I have

private void InitializeComponent()
{
this.ListClients.SelectedIndexChanged += new
System.EventHandler(this.ListClients_SelectedIndexChanged);
}

private void ListClients_SelectedIndexChanged(object sender,
System.EventArgs e)
{
// Do something

}

but it never gets to the event handler when I select an item on the list.
Does "SelectedIndex" have some dubious meaning I'm not seeing?


Jon Cosby
 
G

Guest

You need to set autopostback to be true and it will call ListClients_SelectedIndexChanged when you selected an item in dropdownlist
 

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