title: How do I initialize the controls in an InsertItemTemplate?
body: <p>I have - for instance - an asp:FormView which supports Read, Insert, Update, Delete and is bound to a DataSource:</p>
  
  <pre><code>&lt;asp:FormView ID="FormView1" runat="server" 
      DataSourceID="ObjectDataSource1" &gt;
      &lt;ItemTemplate&gt;
          &lt;asp:Label ID="Label1" runat="server" Text='&lt;%# Bind("MyText") %&gt;' /&gt;
      &lt;/ItemTemplate&gt;
      &lt;EditItemTemplate&gt;
          &lt;asp:TextBox ID="TextBox1" runat="server" Text='&lt;%# Bind("MyText") %&gt;' /&gt;
      &lt;/EditItemTemplate&gt;
      &lt;InsertItemTemplate&gt;
          &lt;asp:TextBox ID="TextBox1" runat="server" Text='&lt;%# Bind("MyText") %&gt;' /&gt;
      &lt;/InsertItemTemplate&gt;
  &lt;/asp:FormView&gt;
  </code></pre>
  
  <p>If I am in Read-Mode or Edit-Mode the control is initialized with the property <code>MyText</code> of the current object which is bound to the FormView.</p>
  
  <p>But when I go to Insert-Mode I do not have a "current object" (<code>FormView1.DataItem</code> is indeed <code>null</code>) and the controls are empty.</p>
  
  <p>If I want to have my TextBox control initialized with a specific value how can I do that? In which event can I hook in to set default values to the controls in the InsertItemTemplate?</p>
  
  <p>Especially I have in mind using an <code>ObjectDataSource</code>. I was expecting that the InsertItemTemplate is initialized with a business object which underlies my ObjectDataSource and which is created by the ASP.NET framework simply by using its default constructor when the InsertItemTemplate gets activated. In the default constructor I would init the class members to the default values I'd like to have in my controls of the InsertItemTemplate. But unfortunately that's not the case: No "default" object is created and bound to the FormView. So it seems I have to initialize all controls separately or to create the default object manually and bind it to the InsertItemTemplate of the FormView. But how and where can I do that?</p>
  
  <p>Thanks in advance!</p>