title: Repeater with a UserControl inside an UpdatePanel is not working C#
body: <p>I am having a problem that can be so stupid but I can't find the solution for that. I have a UserControl inside a Repeater, and this Repeater inside an UpdatePanel. What I need to do is show some tiles (the UserControls) according the date selected.</p>
  
  <p>When the page loads, the tiles are filled normally, everything is working fine. But when I change the date the tiles also are displayed, but the information is not filled inside these tiles. </p>
  
  <p>Below you can see my codes:</p>
  
  <p>HTML Code</p>
  
  <pre><code>&lt;div class="w3-container"&gt;
      &lt;div class="w3-display-container w3-margin-top"&gt;
          &lt;asp:UpdatePanel ID="upData" runat="server"&gt;
              &lt;ContentTemplate&gt;
                  &lt;asp:LinkButton ID="btnDecrescerData" CssClass="w3-display-left w3-text-teal" runat="server" OnClick="DecrescerData"&gt;
                      &lt;i class="fa fa-chevron-left fa-4x" aria-hidden="true"&gt;&lt;/i&gt;
                  &lt;/asp:LinkButton&gt;
                  &lt;span class="w3-display-middle w3-xlarge"&gt;
                      &lt;b&gt;&lt;asp:Label ID="lblDataCirurgia" runat="server"&gt;&lt;/asp:Label&gt;&lt;/b&gt;
                      &lt;span class="w3-text-teal"&gt;&lt;i class="fa fa-calendar" aria-hidden="true"&gt;&lt;/i&gt;&lt;/span&gt;
                  &lt;/span&gt;
                  &lt;asp:LinkButton ID="btnAcrescerData" CssClass="w3-display-right w3-text-teal" runat="server" OnClick="AcrescerData"&gt;
                      &lt;i class="fa fa-chevron-right fa-4x" aria-hidden="true"&gt;&lt;/i&gt;
                  &lt;/asp:LinkButton&gt;
              &lt;/ContentTemplate&gt;
              &lt;Triggers&gt;
                  &lt;asp:AsyncPostBackTrigger ControlID="btnDecrescerData" EventName="Click" /&gt;
                  &lt;asp:AsyncPostBackTrigger ControlID="btnAcrescerData" EventName="Click" /&gt;
              &lt;/Triggers&gt;
          &lt;/asp:UpdatePanel&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;br /&gt;
  &lt;div class="w3-container w3-row"&gt;
      &lt;asp:UpdatePanel ID="upCirurgias" runat="server"&gt;
          &lt;ContentTemplate&gt;
              &lt;asp:Repeater ID="rptCirurgias" runat="server"&gt;
                  &lt;ItemTemplate&gt;
                      &lt;uc:Cirurgia ID="pnlCirurgia" runat="server" 
                          codCirurgia='&lt;%# Eval("CODIGO_CIRURGIA") %&gt;' 
                          dataCirurgia='&lt;%# Eval("DATA_CIRURGIA") %&gt;' 
                          dataAutorizacao='&lt;%# Eval("DATA_AUTORIZACAO") %&gt;' 
                          nomePaciente='&lt;%# Eval("NOME_PACIENTE") %&gt;' 
                          nomeConvenio='&lt;%# Eval("NOME_CONVENIO") %&gt;' 
                          nomeMedico='&lt;%# Eval("NOME_MEDICO") %&gt;' 
                          nomeInstrumentador='&lt;%# Eval("NOME_INSTRUMENTADOR") %&gt;' /&gt;
                  &lt;/ItemTemplate&gt;
              &lt;/asp:Repeater&gt;
          &lt;/ContentTemplate&gt;
      &lt;/asp:UpdatePanel&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Code Behind</p>
  
  <pre><code>public partial class BuscarCirurgias : System.Web.UI.Page
  {
      protected void Page_Load(object sender, EventArgs e)
      {
          if (!Page.IsPostBack)
          {
              lblDataCirurgia.Text = DateTime.Now.ToString("dd/MM/yyyy");
              BuscarCirurgiasDisponiveis();
          }
      }
  
      private void BuscarCirurgiasDisponiveis()
      {
          Usuario usuario = (Usuario)Session["USUARIO"];
          int dia, mes, ano = 0;
  
          dia = int.Parse(lblDataCirurgia.Text.Substring(0, 2));
          mes = int.Parse(lblDataCirurgia.Text.Substring(3, 2));
          ano = int.Parse(lblDataCirurgia.Text.Substring(6, 4));
  
          DateTime dataBusca = new DateTime(ano, mes, dia);
  
          DataTable dt = new DataTable();
          dt = new Controle.Controle().BuscarCirurgiasDisponiveis(usuario, dataBusca);
  
          rptCirurgias.DataSource = dt;
          rptCirurgias.DataBind();
      }
  
      protected void DecrescerData(object sender, EventArgs e)
      {
          int dia, mes, ano = 0;
          dia = int.Parse(lblDataCirurgia.Text.Substring(0, 2));
          mes = int.Parse(lblDataCirurgia.Text.Substring(3, 2));
          ano = int.Parse(lblDataCirurgia.Text.Substring(6, 4));
  
          DateTime dataBusca = new DateTime(ano, mes, dia, DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Second);
          dataBusca = dataBusca.AddDays(-1);
  
          lblDataCirurgia.Text = dataBusca.ToString("dd/MM/yyyy");
  
          BuscarCirurgiasDisponiveis();
      }
  
      protected void AcrescerData(object sender, EventArgs e)
      {
          int dia, mes, ano = 0;
          dia = int.Parse(lblDataCirurgia.Text.Substring(0, 2));
          mes = int.Parse(lblDataCirurgia.Text.Substring(3, 2));
          ano = int.Parse(lblDataCirurgia.Text.Substring(6, 4));
  
          DateTime dataBusca = new DateTime(ano, mes, dia);
          dataBusca = dataBusca.AddDays(1);
  
          lblDataCirurgia.Text = dataBusca.ToString("dd/MM/yyyy");
  
          BuscarCirurgiasDisponiveis();
      }
  }
  </code></pre>
  
  <p>User Control Code Behind</p>
  
  <pre><code>public partial class Cirurgia : System.Web.UI.UserControl
  {
      public string codCirurgia { get; set; }
      public DateTime dataCirurgia { get; set; }
      public DateTime dataAutorizacao { get; set; }
      public string nomePaciente { get; set; }
      public string nomeConvenio { get; set; }
      public string nomeMedico { get; set; }
      public string nomeInstrumentador { get; set; }
  
      protected void Page_Load(object sender, EventArgs e)
      {
          lblCodigoCirurgiaUC.Text = this.codCirurgia;
          lblDataCirurgiaUC.Text = this.dataCirurgia.ToString("dd/MM/yyyy");
          lblDataAutorizacaoUC.Text = this.dataAutorizacao.ToString("dd/MM/yyyy");
          lblNomePacienteUC.Text = this.nomePaciente;
          lblConvenioUC.Text = this.nomeConvenio;
          lblNomeMedicoUC.Text = this.nomeMedico;
          lblNomeInstrumentadorUC.Text = this.nomeInstrumentador;
      }
  }
  </code></pre>
  
  <p>Does anybody know what I can do?</p>
  
  <p>Thanks in advance!</p>