title: How to specify a default value for a field in a .NET details view insert mode
body: <p>Forgive me, but I'm a .NET newbie.  I know there has to be a way to do this.</p>
  
  <p>I have a details view with it's default mode set to Insert.  This is to be used as a form for users to enter records into a database.  For two of the fields, I want to pre-populate the field with information.  Specifically, I have a vb script with a few functions to query Active Directory to return the user's name based upon their user id.  This script works fine.</p>
  
  <p>I call the functions for the user name like this:</p>
  
  <pre><code>&lt;InsertItemTemplate&gt;
      &lt;asp:TextBox ID="txtUserID" runat="server" Text='&lt;%#CurrentUID() %&gt;'&gt;&lt;/asp:TextBox&gt;
  &lt;/InsertItemTemplate&gt;  
  &lt;InsertItemTemplate&gt;
      &lt;asp:TextBox ID="txtUserName" runat="server" Text='&lt;%# GetUserName(CurrentUID()) %&gt;'&gt;&lt;/asp:TextBox&gt;
  &lt;/InsertItemTemplate&gt; 
  </code></pre>
  
  <p>When the page loads, this populates the text boxes with the user id and the user name.</p>
  
  <p>But when the form is submitted, the values in the text boxes are not inserted in to the database.</p>
  
  <p>How can I set default values for the fields when the values come from functions?</p>
  
  <p>Thanks for any help!</p>