How to get values in a dependent Drop down box (HTMLSelect)
Hi,
I'm using two drop down boxes, one for state and one for city. Based on what State the user selects, I want my city list to be populated from the database. I can populate a single list from the database on page load but I can't get this to work. What I want is that the onChange event handler should fire. but it doesn't. Also both State and City controls are server controls.
I found some info regarding how to do this in ASP but I'm using ASP.NET.
Does anyone know how to get this work?
Thanks in advance.
Re: How to get values in a dependent Drop down box (HTMLSelect)
Hi, is the AutoPostBack set to true for the drop down box in question? Also, make sure the code to populate the 2nd combo box is located under SelectedIndexChanged.
Re: How to get values in a dependent Drop down box (HTMLSelect)
Thanks, I got it working by setting autopostback to true.