title: DropDownList items are reset on SelectedIndexChanged
body: <p>I have a cascading dropdown list on my page. The first dropdown contains a list of events. The second dropdown contains a list of attendees. When an event is selected, an AJAX call is made to get the list of attendees for that event, and populate the second dropdown.</p>
  
  <p>My problem is that for the attendees dropdown, I want the user to be redirected to a URL on the SelectedIndexChanged event, with the selected value in the query string. But on the SelectedIndexChanged event, all the items in the second dropdown are reset. Here's my code:</p>
  
  <pre><code>&lt;script type="text/javascript" language="javascript"&gt;      
  
      $(document).ready(function()
      {
          $('#&lt;%= ddlEvents.ClientID %&gt;').change(function() 
          {
             $.ajax({
                 type: "POST",
                 url: 'Default.aspx/PopulateAttendees',
                 data: '{EventId: ' + $('#&lt;%= ddlEvents.ClientID %&gt;').val() + '}',
                 contentType: "application/json; charset=utf-8",
                 dataType: "json",
                 success: OnAttendeesPopulated
             });
          });
  
  
          function OnAttendeesPopulated(response)
          {
              var attendees = response.d;
              var attendeesDropdown = $("#&lt;%= ddlAttendees.ClientID %&gt;");
  
              attendeesDropdown.removeAttr("disabled");
              $.each(attendees, function()
              {
                  attendeesDropdown.append($("&lt;option&lt;/option&gt;").val(this['Value']).html(this['Text']));
              });
          }
      });
  
  &lt;/script&gt;
  
  &lt;asp:DropDownList ID="ddlEvents" runat="server"&gt;&lt;/asp:DropDownList&gt;
  &lt;br /&gt;&lt;br /&gt;
  &lt;asp:DropDownList ID="ddlAttendees" runat="server" Enabled="false" onselectedindexchanged="ddlAttendees_SelectedIndexChanged" AutoPostBack="true"&gt;
  &lt;/asp:DropDownList&gt;
  </code></pre>
  
  <p>And in my code-behind:</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      if (!Page.IsPostBack)
      {
          //Bind dropdown to Events
          ddlEvents.DataSource = EventsList();
          ddlEvents.DataTextField = "Name";
          ddlEvents.DataValueField = "EventID";
          ddlEvents.DataBind();
      }
  }
  
  
  [System.Web.Services.WebMethod]
  public static ArrayList PopulateAttendees(int EventId)
  {
      ArrayList attendees = new ArrayList();
      attendees = GetAttendees(EventId);
  
      return attendees;
  }
  
  
  protected void ddlAttendees_SelectedIndexChanged(object sender, EventArgs e)
  {
      string AttendeeId = ddlAttendees.SelectedValue;
  
      Response.Redirect("http://mysite.com?id=" + AttendeeId);
  }
  </code></pre>
  
  <p>When the SelectedIndexChanged event is hit, ddlAttendees is empty.</p>
  
  <p>Does anyone know how I can keep the items in ddlAttendees?</p>