title: "Select All" option for two or more dropdown list
body: <p>I have two drop-down list in which one is "State" and another is "Cluster". Both of these drop-down list are relational. For example if I select Kerala in State then Cluster will populate its important cities and dist. like Pathnamthitta, calicut, palakad etc. </p>
  
  <p>So, what I want is, I want to give an option "Select All" in both State and Cluster ddl.</p>
  
  <p>I've gone through:</p>
  
  <p><a href="https://stackoverflow.com/questions/16191005/select-all-record-asp-net-dropdownlist">How to select all records in a DropDownList</a> </p>
  
  <p><a href="http://www.w3schools.com/aspnet/control_dropdownlist.asp" rel="nofollow noreferrer">http://www.w3schools.com/aspnet/control_dropdownlist.asp</a> </p>
  
  <p><a href="http://forums.asp.net/t/1221977.aspx?Adding+a+Select+all+option+to+a+drop+down+list" rel="nofollow noreferrer">http://forums.asp.net/t/1221977.aspx?Adding+a+Select+all+option+to+a+drop+down+list</a></p>
  
  <p>But none of them worked for me. I can able to have select all in state but not getting cluster values populated on the other ddl.</p>
  
  <p>This is my code for "State" ddl:</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
  if (!IsPostBack)
  {
  DataSet3TableAdapters.tbl_energy_reportTableAdapter state;
  state = new DataSet3TableAdapters.tbl_energy_reportTableAdapter();
  DataTable dt = new DataTable();
  dt = state.GetDataByStateInnerJoin();
  DropDownList1.DataSource = dt;
  DropDownList1.DataTextField = "state1";
  DropDownList1.DataValueField = "state1";
  DropDownList1.DataBind();                
  DropDownList1.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select State--", "0"));
  DropDownList2.Items.Insert(0, new System.Web.UI.WebControls.ListItem("--Select Cluster--", "0"));
  }
  }
  </code></pre>
  
  <p>And This code is for "Cluster"</p>
  
  <pre><code>protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
  {
  
  DataSet3TableAdapters.tbl_energy_reportTableAdapter state;
  state = new DataSet3TableAdapters.tbl_energy_reportTableAdapter();
  DataTable dt = new DataTable();
  dt = state.GetDataByClusterInnerJoin(DropDownList1.SelectedValue);
  DropDownList2.DataSource = dt;
  DropDownList2.DataTextField = "cluster";
  DropDownList2.DataValueField = "cluster";
  DropDownList2.DataBind();
  
  }
  </code></pre>
  
  <p>This is the query for State ddl:</p>
  
  <pre><code>SELECT DISTINCT tbl_site_details.state1
  FROM            tbl_site_details INNER JOIN
                           tbl_energy_report ON tbl_energy_report.Site_ID = tbl_site_details.site_id
  </code></pre>
  
  <p>And this the query for Cluster ddl:</p>
  
  <pre><code>SELECT        tbl_site_details.cluster
  FROM            tbl_site_details INNER JOIN
                           tbl_energy_report ON tbl_energy_report.Site_ID = tbl_site_details.site_id
  WHERE        (tbl_site_details.state1 = @state1)
  </code></pre>