title: FormView dynamic templates does not send form values on insert/updates
body: <p>I am getting following error when I click Insert button on a dynamically loaded templates for FormView. The default form mode is set to insert. I do see insert template loading fine. I have TypeName="WebApplication1.Repository.AccountRepo" and DataObjectTypeName="WebApplication1.Model.Account" to correct types. Can someone please help.</p>
  
  <p>The error I get is
  <b>ObjectDataSource 'ObjectDataSource1' has no values to insert. Check that the 'values' dictionary contains values. </b></p>
  
  <pre><code>    &lt;asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"&gt;
          &lt;h2&gt;
              Welcome to ASP.NET!
          &lt;/h2&gt;
          &lt;p&gt;
              To learn more about ASP.NET visit &lt;a href="http://www.asp.net" title="ASP.NET Website"&gt;
                  www.asp.net&lt;/a&gt;.
          &lt;/p&gt;
          &lt;p&gt;
              You can also find &lt;a href="http://go.microsoft.com/fwlink/?LinkID=152368&amp;amp;clcid=0x409"
                  title="MSDN ASP.NET Docs"&gt;documentation on ASP.NET at MSDN&lt;/a&gt;.
              &lt;uc1:WebUserControl1 ID="WebUserControl11" runat="server" /&gt;
          &lt;/p&gt;
          &lt;asp:FormView ID="FormView1" runat="server" DataSourceID="ObjectDataSource1"
              OnLoad="FormView1_Load" OnModeChanged="FormView1_ModeChanged" 
              oninit="FormView1_Init" ViewStateMode="Enabled"  DefaultMode="Insert"&gt;
  
          &lt;/asp:FormView&gt;
          &lt;asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DataObjectTypeName="WebApplication1.Model.Account"
              DeleteMethod="Delete"  SelectMethod="Select" TypeName="WebApplication1.Repository.AccountRepo"
              UpdateMethod="Update" oninserting="ObjectDataSource1_Inserting"
              InsertMethod="Insert"&gt;
              &lt;InsertParameters&gt;
                  &lt;asp:Parameter Name="acct" Type="Object" /&gt;
              &lt;/InsertParameters&gt;
              &lt;UpdateParameters&gt;
                  &lt;asp:Parameter Name="acct" Type="Object"/&gt;
              &lt;/UpdateParameters&gt;
          &lt;/asp:ObjectDataSource&gt;
      &lt;/asp:Content&gt;
  </code></pre>
  
  <p>Following code in page init method</p>
  
  <pre><code>    public partial class _Default : System.Web.UI.Page
      {
          protected void Page_Init(object sender, EventArgs e)
          {
              //ITemplate control = Page.LoadTemplate("~/WebUserControl2.ascx");
              FormView1.EditItemTemplate = Page.LoadTemplate("~/WebUserControl2.ascx");
              FormView1.InsertItemTemplate = Page.LoadTemplate("~/WebUserControl2.ascx");
              FormView1.ItemTemplate = Page.LoadTemplate("~/WebUserControl2.ascx");
  
          }
      }
  </code></pre>
  
  <p>I have following HTML fragments in WebUserControl2.ascx</p>
  
  <pre><code>    &lt;%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebUserControl2.ascx.cs"
          Inherits="WebApplication1.WebUserControl2" ViewStateMode="Enabled" %&gt;
      Name:
      &lt;asp:TextBox ID="NameTextBox" runat="server" Text='&lt;%# Bind("Name") %&gt;' /&gt;
      &lt;br /&gt;
      Address:
      &lt;asp:TextBox ID="AddressTextBox" runat="server" Text='&lt;%# Bind("Address") %&gt;' /&gt;
      &lt;br /&gt;
  
      &lt;asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
          Text="Insert" /&gt;
      &amp;nbsp;
      &lt;asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False"
          CommandName="Cancel" Text="Cancel" /&gt;
  </code></pre>
  
  <p>This is the sample repository class that is business class set to ObjectDataSource1</p>
  
  <pre><code>    public class AccountRepo
      {
          private static Model.Account _account;
          public void Delete(Model.Account acct)
          {
              _account = new Model.Account();
          }
  
          public Model.Account Update(Model.Account acct)
          {
              _account = acct;
              return _account;
          }
  
          public Model.Account Insert(Model.Account acct)
          {
              _account = new Model.Account() { Name = "new" };
              return _account;
          }
  
          public Model.Account Select()
          {
              if (_account == null)
                  _account = new Model.Account() { Name = "BrandNew" };
  
              return _account;
          }
  
      }
  </code></pre>
  
  <p>This is the account class</p>
  
  <pre><code>    public class Account
      {
          public string Name { get; set; }
          public string Address {get;set;}
  
          public static Account CreateAccount(){
              return new Account();
          }
  
      }
  </code></pre>