title: ASP.NET, refresh dropdownlist2 when dropdownlist1 selection changes?
body: <p>I have two databound dropdownlist controls. The first one (dropdownlist1) pulls directly from a table. The second one (dropdownlist2) also pulls from a table, but uses the selected value from dropdownlist1 in it's WHERE clause.</p>
  
  <p>How do I update/refresh dropdownlist2 after the user makes a selection in dropdownlist1? (Using VB if done by code)</p>
  
  <p>I've tried setting the "Auto Postback" property of dropdownlist1 to "true" and ultimately, this approach works. The only problem is, if I keep changing the selection in dropdownlist1, the selections available in dropdownlist2 are duplicated.</p>
  
  <p>Both dropdownlist controls are contained within a CreateUserWizard control using template. I've tried using FindControl and then DataBind() on dropdownlist2 from the SelectedIndexChanged event of dropdownlist1, but no change occurs after a selection is made in dropdownlist1.</p>
  
  <p>Any ideas?</p>
  
  <p><strong>SelectedIndexChanged Event</strong></p>
  
  <pre><code>Protected Sub AssignedManager_SelectedIndexChanged(sender As Object, e As System.EventArgs)
      CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("AssignedSupervisor").DataBind()
  End Sub
  </code></pre>
  
  <p><strong>* Above, AssignedManager is the first dropdownlist and AssignedSupervisor is the second dropdownlist *</strong></p>