title: How do I alter the items in my DropDownList in ASP.NET
body: <p>I have this that gets bound in my code behind:</p>
  
  <pre><code> &lt;asp:DropDownList id="ddlPopulation" runat="server" DataTextField="population" DataValueField="pid" AppendDataBoundItems="True"&gt;
  &lt;asp:ListItem&gt;Default&lt;/asp:ListItem&gt;
  </code></pre>
  
  <p></p>
  
  <p>How do I alter the list items in the code behind? I want to do an Html_Decode and Trim on them before they are rendered to the user?</p>
  
  <p>The DataBind code is:</p>
  
  <pre><code> StringBuilder sql = new StringBuilder();
  
      // Define sql
      sql.Append("SELECT DISTINCT datasource ");
      sql.Append("FROM meta ");
      sql.Append("WHERE datasource != '' ");
      sql.Append("ORDER BY datasource ASC ");
  
      IDataReader reader = SqlHelper.GetDataReader(sql.ToString());
  
      ddlDatasources.DataSource = reader;
      ddlDatasources.DataBind();
  </code></pre>