title: How to get DataValueField from dropdownlist?
body: <p>I want to get data from dropdownlist selected item with sql server.But it's don't working.</p>
  
  <p>My asp.net desing codes:</p>
  
  <pre><code>&lt;asp:DropDownList ID="drp_SiparisYazan" runat="server" DataSourceID="SqlDataSourceSiparisYazan" DataTextField="ACIKLAMA" DataValueField="KOD"&gt;&lt;/asp:DropDownList&gt;       
  &lt;asp:SqlDataSource runat="server" ID="SqlDataSourceSiparisYazan" ConnectionString='&lt;%$ ConnectionStrings:.. %&gt;' SelectCommand="SELECT  ...'"&gt;&lt;/asp:SqlDataSource&gt;
  </code></pre>
  
  <p>Now I putting valuefield from sqlserver.After It is returning null value in selecteditem.Value.</p>
  
  <pre><code>protected void btnSave_Click(object sender, EventArgs e)
  {
      con.Open();
      SqlCommand cmdSave = new SqlCommand(CommandText, con);
      cmdSave.Parameters.AddWithValue("@siparisyazan", drp_SiparisYazan.SelectedItem.Value);
  }
  </code></pre>