title: DetailsView change text to a label on ItemInserted event
body: <p>I have label within a DetailsView.
  I need to change Text property of this Label inside the DetailsView after event ItemInserted has been trigged.</p>
  
  <p>Script does not throws any error, but the Label does not change its text property.
  Any ideas what I am doing wrong?</p>
  
  <p>Thanks for your time!</p>
  
  <p>Markup:</p>
  
  <pre><code>&lt;asp:DetailsView ID="uxInsertAuthorInput" runat="server" AutoGenerateRows="False"
          DataKeyNames="AuthorId" DataSourceID="EntityDataSourceCreateAuthor" DefaultMode="Insert"
          OnItemInserting="uxInsertAuthor_ItemInserting" OnItemInserted="uxInsertAuthorInput_ItemInserted"&gt;
      &lt;Fields&gt;
          &lt;asp:TemplateField HeaderText="First Name" SortExpression="FirstName"&gt;
              &lt;ItemTemplate&gt;
                  &lt;asp:Label ID="uxFirstNameDisplayer" runat="server" Text='&lt;%# Bind("FirstName") %&gt;' /&gt;
              &lt;/ItemTemplate&gt;
              &lt;InsertItemTemplate&gt;
                  &lt;asp:TextBox ID="uxFirstNameInput" runat="server" Text='&lt;%# Bind("FirstName") %&gt;' /&gt;
                  &lt;asp:RequiredFieldValidator ID="uxRequiredFieldValidatorFirstName" runat="server"
                      ControlToValidate="uxFirstNameInput" ErrorMessage="First Name Field is required"&gt;*&lt;/asp:RequiredFieldValidator&gt;
              &lt;/InsertItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
          &lt;asp:TemplateField HeaderText="Last Name" SortExpression="LastName"&gt;
              &lt;ItemTemplate&gt;
                  &lt;asp:Label ID="uxLastNameDisplayer" runat="server" Text='&lt;%# Bind("LastName") %&gt;' /&gt;
              &lt;/ItemTemplate&gt;
              &lt;InsertItemTemplate&gt;
                  &lt;asp:TextBox ID="uxLastNameInput" runat="server" Text='&lt;%# Bind("LastName") %&gt;' /&gt;
                  &lt;asp:RequiredFieldValidator ID="uxRequiredFieldValidatorLastName" runat="server"
                      ControlToValidate="uxLastNameInput" ErrorMessage="Last Name Field is required"&gt;*&lt;/asp:RequiredFieldValidator&gt;
              &lt;/InsertItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
          &lt;asp:TemplateField HeaderText="UserId" SortExpression="UserId"&gt;
              &lt;InsertItemTemplate&gt;
                  &lt;asp:DropDownList ID="uxUserListSelector" runat="server" /&gt;
                  &lt;asp:Label ID="uxAllert" runat="server" Text="Label" /&gt;
              &lt;/InsertItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
          &lt;asp:TemplateField HeaderText="Profile" SortExpression="ContentAuthor"&gt;
              &lt;ItemTemplate&gt;
                  &lt;asp:Label ID="uxContentAuthorDisplayer" runat="server" Text='&lt;%# Bind("ContentAuthor") %&gt;' /&gt;
              &lt;/ItemTemplate&gt;
              &lt;InsertItemTemplate&gt;
                  &lt;asp:TextBox ID="uxContentAuthorInput" runat="server" Text='&lt;%# Bind("ContentAuthor") %&gt;' /&gt;
              &lt;/InsertItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
          &lt;asp:TemplateField HeaderText="NoteInternal" SortExpression="NoteInternal"&gt;
              &lt;ItemTemplate&gt;
                  &lt;asp:Label ID="uxNoteInternalDisplayer" runat="server" Text='&lt;%# Bind("NoteInternal") %&gt;' /&gt;
              &lt;/ItemTemplate&gt;
              &lt;InsertItemTemplate&gt;
                  &lt;asp:TextBox ID="uxNoteInternalInput" runat="server" Text='&lt;%# Bind("NoteInternal") %&gt;' /&gt;
              &lt;/InsertItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
          &lt;asp:CommandField ShowInsertButton="True" /&gt;
      &lt;/Fields&gt;
  &lt;/asp:DetailsView&gt;
  </code></pre>
  
  <p>Code-behind:</p>
  
  <pre><code>protected void uxInsertAuthorInput_ItemInserted(object sender, DetailsViewInsertedEventArgs e)
  {
      String FirstName = e.Values["FirstName"].ToString();
      String LastName = e.Values["LastName"].ToString();
      uxMessageDisplayer.Text = string.Format("Author: {0} {1} has been added.", FirstName, LastName);
  
      // problem is here:
      Label myAllert = (Label)uxInsertAuthorInput.FindControl("uxAllert");
      myAllert.Text = "TEST";
  }
  </code></pre>