Jquery get the key/value - key from asp drop down
<p>I have the following in my code:</p>

<pre><code>    &lt;asp:DropDownList id="City" runat="server"&gt;
</code></pre>

<p>I tried using the following to get the key from the key value but it shows up as undefined although I selected  from the dropdown</p>

<pre><code>    var city = $("#city option:selected").val();

    alert(city);
</code></pre>
