title: How to add dropdown list default value
body: <p>I am using asp.net for fetching data from sql table to dropdown list. The problem is that, when I give default selection to the dropdown list. It does not take the default value. 
  Please see the code    </p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      if (!IsPostBack)
      {
          conn.Open();
          SqlCommand cmd = new SqlCommand("select * from States_agri", conn);
          SqlDataReader dr = cmd.ExecuteReader();
          ddl_state.DataSource = dr;
          ddl_state.Items.Clear();
          ddl_state.Items.Add("--Please Select state--");
          ddl_state.DataTextField = "StateName";
          ddl_state.DataValueField = "StateID";
          ddl_state.DataBind();
          conn.Close();
      }
  }
  `
  </code></pre>
  
  <p>Also Please see the dropdown list aspx code for your reference.   </p>
  
  <pre><code>&lt;asp:UpdatePanel ID="FormUpdate" runat="server" UpdateMode="Conditional"&gt;
      &lt;Triggers&gt;
          &lt;asp:AsyncPostBackTrigger ControlID="ddl_state" EventName="SelectedIndexChanged" /&gt;
      &lt;/Triggers&gt;
      &lt;ContentTemplate&gt;
          &lt;table&gt;
              &lt;tr&gt;
                   &lt;td&gt;State*&lt;/td&gt;
                   &lt;td&gt;
                       &lt;asp:DropDownList ID="ddl_state" runat="server" CssClass="cbfld-popup1" AutoPostBack="true" OnSelectedIndexChanged="ddl_state_SelectedIndexChanged"&gt;
                       &lt;asp:ListItem Enabled="true" Selected="True" Text="Please select State"&gt;&lt;/asp:ListItem&gt;
                       &lt;/asp:DropDownList&gt;
                   &lt;/td&gt;
  
              &lt;/tr&gt;
              &lt;tr&gt;
                   &lt;td&gt;District*&lt;/td&gt;
                   &lt;td&gt;
                       &lt;asp:DropDownList ID="ddl_district" CssClass="cbfld-popup1" runat="server"&gt;
                       &lt;asp:ListItem Enabled="true" Selected="True" Text="Please select city"&gt;&lt;/asp:ListItem&gt;
                                                                                                        &lt;/td&gt;
              &lt;/tr&gt;
           &lt;/table&gt;
       &lt;/ContentTemplate&gt;
  &lt;/asp:UpdatePanel&gt;
  </code></pre>