ASP.NET page events - Button has to be clicked twice to fire event
<p>I have an imageButton with a few controls(2 dropdowns, 3 textboxes) inside an UpdatePanel.</p>

<p>When I change the text of any of the textboxes, the ImageButton needs to be clicked twice to fire the onClick event.</p>

<p>I just don't get why it happens, since I have any events associated with the textboxes.</p>

<p>Any ideas?</p>

<p>Thanks!</p>

<p>Ok, just editing to show up my code.</p>

<p>This is the UpdatePanel where things are:</p>

<pre><code>&lt;asp:UpdatePanel ID="upBusca" runat="server"&gt;&lt;ContentTemplate&gt;
&lt;asp:UpdateProgress ID="pMaster" runat="server"&gt;&lt;ProgressTemplate&gt;&lt;div id="loaderOverlay"&gt;&lt;/div&gt;&lt;div id="loader"&gt;&lt;img alt="Carregando..." src='&lt;%# "/imagens/" + ThemeName + "/loading.gif" %&gt;' /&gt;&lt;p&gt;Carregando...&lt;/p&gt;&lt;/div&gt;&lt;/ProgressTemplate&gt;&lt;/asp:UpdateProgress&gt;
&lt;div style="float:left" id="busca"&gt;
&lt;img src='&lt;%# "/imagens/" + ThemeName + "/busca-fundo-e.jpg" %&gt;' class="esquerda" alt=""/&gt;
&lt;img src='&lt;%# "/imagens/" + ThemeName + "/busca-fundo-d.jpg" %&gt;' class="direita" alt=""/&gt; 
&lt;p class="titulo"&gt;Utilize os campos abaixo para filtrar as operações registradas.&lt;/p&gt;    
&lt;div style="float:left"&gt;
&lt;p&gt;&lt;b&gt;Status:&lt;/b&gt;&lt;/p&gt;
&lt;asp:DropDownList ID="ddlStatus" runat="server"&gt;
    &lt;asp:ListItem Selected="True" Value="T"&gt;Todos os títulos&lt;/asp:ListItem&gt;
    &lt;asp:ListItem Value="3"&gt;Título liberado para antecipação&lt;/asp:ListItem&gt;
    &lt;asp:ListItem Value="4"&gt;Antecipação solicitada&lt;/asp:ListItem&gt;
    &lt;asp:ListItem Value="2"&gt;Título pago&lt;/asp:ListItem&gt;
    &lt;asp:ListItem Value="5"&gt;Título não liberado para antecipação&lt;/asp:ListItem&gt;
&lt;/asp:DropDownList&gt;&lt;br /&gt;
&lt;p&gt;&lt;b&gt;Data:&lt;/b&gt;&lt;/p&gt;
    &lt;asp:DropDownList ID="ddlData" runat="server" AutoPostBack="True" 
        onselectedindexchanged="ddlData_SelectedIndexChanged"&gt;
        &lt;asp:ListItem Selected="True"&gt;-- Selecione --&lt;/asp:ListItem&gt;
        &lt;asp:ListItem Value="dataEmissao"&gt;Emissão&lt;/asp:ListItem&gt;
        &lt;asp:ListItem Value="solicitacao"&gt;Solicitação&lt;/asp:ListItem&gt;
        &lt;asp:ListItem Value="vencimento"&gt;Vencimento&lt;/asp:ListItem&gt;
        &lt;asp:ListItem Value="pagamento"&gt;Pagamento&lt;/asp:ListItem&gt;
    &lt;/asp:DropDownList&gt;
    &amp;nbsp;&amp;nbsp;&lt;asp:TextBox ID="txtDtInicial" runat="server" AutoPostBack="True" 
        Visible="False"&gt;&lt;/asp:TextBox&gt;
    &lt;asp:Label ID="lblA" runat="server" Text="à" Visible="False"&gt;&lt;/asp:Label&gt;
    &lt;asp:TextBox ID="txtDtFinal" runat="server" AutoPostBack="True" Visible="False"&gt;&lt;/asp:TextBox&gt;
    &lt;br /&gt;
&lt;p&gt;&lt;b&gt;Nº Solicitação:&lt;/b&gt;&lt;/p&gt;
&lt;asp:TextBox ID="txtSolicitacao" runat="server" AutoPostBack="True" &gt;&lt;/asp:TextBox&gt;
    &lt;br /&gt;
&lt;p&gt;&lt;b&gt;Valor:&lt;/b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;R$&lt;/p&gt;
 &lt;asp:TextBox ID="txtValor" runat="server"
    AutoPostBack="True" MaxLength="12" 
        onkeypress="javascript:mascara(this, soMoeda);"&gt;&lt;/asp:TextBox&gt;
    &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;

&lt;cc1:MaskedEditExtender ID="meDataD" runat="server" TargetControlID="txtDtInicial" 
        ClearMaskOnLostFocus="False" Mask="99/99/9999"&gt;
&lt;/cc1:MaskedEditExtender&gt;
&lt;cc1:MaskedEditExtender ID="meDataAte" runat="server" TargetControlID="txtDtFinal" 
        ClearMaskOnLostFocus="False" Mask="99/99/9999"&gt;
&lt;/cc1:MaskedEditExtender&gt;
    &lt;asp:ImageButton ID="imbBuscar" runat="server" 
        ImageUrl="~/imagens/Default/bt-busca.jpg" onclick="imbBuscar_Click" /&gt;
&lt;br /&gt;     
&lt;/div&gt;
&lt;div style="float:left"&gt;    
&lt;p&gt;&lt;b&gt;Número NF:&lt;/b&gt;&lt;/p&gt;
&lt;asp:TextBox ID="txtNf" runat="server" AutoPostBack="True" &gt;&lt;/asp:TextBox&gt;
    &lt;br /&gt;     
&lt;/div&gt;
&lt;/div&gt;&lt;!-- Busca --&gt;    
&lt;hr /&gt;
&lt;/ContentTemplate&gt;
&lt;/asp:UpdatePanel&gt;
</code></pre>

<p>I'm not adding any controls on the page load.</p>
