How to set the dropdownlist value?
<p>I am using this technique: <a href="http://stackoverflow.com/questions/2670327/is-there-a-way-to-hold-the-values-lost-in-postback">http://stackoverflow.com/questions/2670327/is-there-a-way-to-hold-the-values-lost-in-postback</a></p>

<p>After it does the postback, how do I set which item is selected?
<br>
 $(document).ready(function() { <br></p>

<pre><code>     if (document.getElementById("txtHidData").value != "")&lt;br&gt;
        $("#country").val(document.getElementById("txtHidData").value);&lt;br&gt;
        //or&lt;br&gt;
        //$("#country")[0].selectedIndex = document.getElementById("txtHidData").value;&lt;br&gt;
</code></pre>

<p>Does not work either way, any help? Thanks.<br></p>

<p><strong>EDIT:</strong></p>

<p>$("#country").change(function() {</p>

<pre><code>        debugger
         var _selected = $("#country option:selected").val();
         document.getElementById("txtHidData").value = "";
         document.getElementById("txtHidData").value = _selected;
         // $("#txtHidData").value = _selected;
</code></pre>

<p>....</p>
