title: ASP.NET DropDownList not retaining selected item on postback
body: <p>I have an ASP DropDownList that gets populated on the Page_Load event, after i select an item and hit a button the selected item gets cleared and the first item in the DropDownList gets selected. (The DropDownList is only populated when the page is not postback)</p>
  
  <pre><code>if (!IsPostBack)
  {
      List&lt;Country&gt; lCountries = new List&lt;Country&gt;();
      List&lt;CompanySchedule&gt; lCompanySchedules = new List&lt;CompanySchedule&gt;();
      this.Load_Countries(lCountries);
      this.Load_Schedules(lCompanySchedules);
      if (personnelRec == null) 
      { 
          personnelRec = new Personnel(); 
      }
      if (Request.QueryString["UA"] != null &amp;&amp; Convert.ToInt32(Request.QueryString["UA"].ToString()) &gt; 0)
      {
          userAccount.ID = Convert.ToInt32(Request.QueryString["UA"].ToString());
          App_Database.Snapshift_Select_Helper.SNAPSHIFT_SELECT_PERSONNEL_APP_ACCOUNT(ref userAccount);
      }
  
      this.imgEmployeePicture.ImageUrl = "./images/Employees/nophoto.gif";
      if (Request.QueryString["EI"] != null &amp;&amp; Convert.ToInt32(Request.QueryString["EI"].ToString()) &gt; 0)
      {
              this.Load_PersonnelRec(Convert.ToInt32(Request.QueryString["EI"].ToString()));
      }
      else
      {
          this.lblChangeDirectionHead.Enabled = false;
          this.lblChangeDirections.Enabled = false;
          this.lbSchedules.Disabled = true;
      }
  }
  </code></pre>