title: Get the selected item of dropdown list from code behind
body: <p>How to get the selected value of a dropdownlist in code behind?</p>
  
  <p>In my aspx page I have a dropdown list
  <strong>
  </strong></p>
  
  <p>Using Jquery, I'm adding items</p>
  
  <pre><code>var city = $("#city").val();
  if (city.toString() != "") {
      var citySelect = $('#cityName');
      citySelect.append($('&lt;option&gt;&lt;/option&gt;').val('0').html('-Select City-'));
      for (i = 0; i &lt; City.response_list.length; i++) {
          citySelect.append($('&lt;option&gt;&lt;/option&gt;').val(City.response_list[i].id_city + " - " + City.response_list[i].label).html(City.response_list[i].id_city + " - " + City.response_list[i].label));
      }
  }
  </code></pre>
  
  <p>In code behind when I try to get the selected value, 
   I'm getting "System.NullReferenceException: Object reference not set to an instance of an object"</p>
  
  <p>How to get the selected value?</p>