ASP .NET - Set default values of ListView InsertItemTemplate
<p>For a DetailsView I use the following code:</p>

<pre><code> protected void DetailsView1_PreRender(object sender, EventArgs e)
{
     DetailsView myDetailsView = (DetailsView)sender;
    //set value to current datetime
    ((TextBox)myDetailsView.FindControl("TextBox1")).Text =
    DateTime.Now.ToString("M/d/yyyy HH:mm");
}
</code></pre>

<p>When I try to do the same thing for a ListView control (specifically the InsertItemTemplate) I get a 'NullReferenceException' error message.</p>

<p>How do I set the default value of a Listview InsertItemTemplate textbox?</p>
