title: Dropdown list not selecting value asp.net
body: <pre><code>  ddlBanAcc.Items.Insert(0, new ListItem("", ""));
    string s = ddlBanAcc.SelectedValue;
    string[] words = s.Split('|');
    if (ddlBanAcc.SelectedIndex &gt; 1)
    {
      query += "'and DtaLineAccountToDebit='" + words[0] + "'";
    }
  </code></pre>
  
  <p>On the ddlBankAcc (Dropdownlist selection) i am populating the Datagrid which is in the Update Panel </p>
  
  <p>However the code is not executing and no value is getting selected by this statement <code>ddlBanAcc.SelectedValue;</code></p>
  
  <p>EDIT: HTML CODE</p>
  
  <pre><code>&lt;td align="left" valign="top"&gt;
                              &amp;nbsp;&lt;/td&gt;
                   &lt;td&gt;
                              Bank Account:
                          &lt;/td&gt;
                          &lt;td&gt;
   &lt;asp:DropDownList runat="server" ID="ddlBanAcc" Width="160px" TaEvalex="3"&gt;
      &lt;/asp:DropDownList&gt;
  
                          &lt;/td&gt;
  </code></pre>
  
  <p>EDIT : how i am adding data in ddlBanAcc</p>
  
  <pre><code>DataTable dtbankaccount = oDBAccess.getDataTable("SELECT BkiAccountNb + ' | ' + BkiCurrency+ ' | ' +BkiAccountNb AS CONCATE  From VwCieBankAcc");
      ddlBanAcc.DataTextField = "CONCATE";
      ddlBanAcc.DataSource = dtbankaccount;
  
      ddlBanAcc.DataBind();
  </code></pre>