title: Can't get DropDownList value shown in FormView ItemTemplate to appear in EditItemTemplate by default
body: <p>I have an edit button and a dropdownlist inside a formview. I am using Linq To Entities to get the data I need to work with and have no problem populating and viewing the formview itemtemplate.  </p>
  
  <p>However, the dropdownlist control (<code>id="ddlEligibility"</code>) is only in the<code>edititemtemplate</code> (I use a textbox in the <code>itemtemplate</code> to display the current value) and I am having a problem getting the value initially shown in the itemtemplate to appear when the edititemtemplate is shown.  All I get right now is the dropdownlist with the first value shown.  I want the value from the itemtemplate to appear by default and the user can change it if they wish.  Here is the code that populates the dropdownlist.  Anyone have a suggestions?</p>
  
  <pre><code>protected void btnEdit_Click(object sender, EventArgs e)
  {
      fvSubscriber.ChangeMode(FormViewMode.Edit);
      fvSubscriber.DataBind(); 
  
      LifeLineDSEntities context = new LifeLineDSEntities():
  
      var program = from p in context.EligibilityPrograms
                    select p;
  
      DropDownList ddlEligibility = (DropDownList)(fvSubscriber.FindControl("ddlEligibility")));
  
      if (ddlEligibility != null)
      {
          ddlEligibility.DataSource = program;
          ddlEligibility.DataTextField = "ProgramName";
          ddlEligibility.DataValueField = "eligibilityCode";
          ddlEligibility.DataBind();
      }
  }
  </code></pre>
  
  <p>DropDownlist in FormView...</p>
  
  <pre><code>&lt;form id="form1" runat="server"&gt;
      &lt;asp:FormView ID="fvSubscriber" runat="server" RenderOuterTable="false" DefaultMode="Readonly" OnModeChanging="fvSubscriberChanging"&gt;
          &lt;ItemTemplate&gt;
             &lt;asp:TextBox ID="txtEligibility" runat="server" Text='&lt;%# Eval("ProgramName") %&gt;' /&gt;
          &lt;/ItemTemplate&gt;
          &lt;EditItemTemplate&gt;
              &lt;asp:DropDownList ID="ddlEligibility" runat="server" /&gt;
          &lt;/EditItemTemplate&gt;
      &lt;/asp:FormView&gt;
  &lt;/form&gt;
  </code></pre>