title: redirect after formview insert command
body: <p>I'm trying to redirect after a successful insert command on a formview.  Here's what I have:</p>
  
  <p>Detail.aspx:</p>
  
  <pre><code>&lt;asp:FormView id="formview1"...datasourceid="detailsSQLDS"&gt;
     &lt;InsertItemTemplate&gt;
          DateOfService: 
          &lt;asp:TextBox ID="DateOfServiceTextBox" runat="server" 
              Text='&lt;%# Bind("DateOfService") %&gt;' /&gt;
          &lt;br /&gt;
          InsurancePrimary:
          &lt;asp:TextBox ID="InsurancePrimaryTextBox" runat="server" 
              Text='&lt;%# Bind("InsurancePrimary") %&gt;' /&gt;
          &lt;br /&gt;
          &lt;asp:LinkButton ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" /&gt;
  
     &lt;/InsertItemTemplate&gt;
  &lt;/asp:FOrmView&gt;
  ....
  &lt;asp:SqlDataSource ID="detailsSQLDS" runat="server" 
      ConnectionString="..." 
      InsertCommandType="StoredProcedure"
      InsertCommand="usp_Insert"
   &gt;
  </code></pre>
  
  <p>Code Behind:</p>
  
  <pre><code>protected void formview1_ItemInserted(object sender, FormViewInsertedEventArgs e)
  {
      Response.Redirect( "List.aspx?mrn=" + Request.QueryString["mrn"] );
  }
  </code></pre>
  
  <p>The insert works fine, but not the redirect.  I don't think it's firing the function formview1_ItemInserted(....).  Is there a way to tell the formview to fire this function after a successful insert, or some other way of doing this?  Thanks!</p>