drop down list not updating selected item on subsequent calls
<p>i have the following code </p>

<pre><code>Page_Load () {
 if (!IsPostBack)
   {               
            //data binding to ddl year    

   } else {
       if (ViewState["ddlyear"] != null)
            {
                ddlyear.SelectedValue = ViewState["ddlyear"].ToString();

            }
        }
}

ddlyear_SelectedIndexChanged {
    ViewState["ddlyear"] = ddlyear.SelectedItem.Value.ToString();
}
</code></pre>

<p>heres the error.</p>

<ul>
<li><p>load page select item in ddlyear, which reloads page, and correctly displays the item in the ddl.</p></li>
<li><p>if I change the displays the selected item will not change. </p></li>
</ul>

<p>if I put a breakpoint on <code>ddlyear.SelectedItem.Value.ToString();</code> the value actually never changes form the first call. it will change once, to the selected items value, but will not change even if another item is selected on subsequent page calls. </p>

<p>i.e.</p>

<ol>
<li>first page load - ddlyear = 1000 </li>
<li>change to another option, lets say 1001</li>
<li>page reload, ddlyear = 1001 </li>
<li>change to another option, lets say 1002</li>
<li>page reloads, ddlyear = <strong>1001</strong> not 1002</li>
</ol>
