Q:

How to set an asp DropDownList control's SelectMethod Respond to a selection change in another DropDownList control on the same page

I have two asp DropDownList controls on the same page. One is for categories, and the other is for subcategories. Each uses linq queries to get lists from the database, and the subcategories control's query uses criteria gathered from the categories control. The problem is that the controls load on page initialization and get their SelectMethods then. I need to figure out how to change the subcategories control's list whenever the categories list's selection changes. Calling the subcategories control's SelectMethod from the categories control's OnSelectedIndexChanged event doesn't work. Is there an easy way to do this? Please help.

A:

You first need to Enable Categories DropDownList's AutoPostBack property. Then on its SelectedIndexChanged event, call SubCategories' SelectMethod passing in  the Value property of Categoreis' SelectedItem.
Here's a link to a video tutorial you may find useful:
http://www.youtube.com/watch?v=cFQ5yGT4LTU

