Button click not working inside update panel

Try this

set ChildrenAsTriggers to true and add EventName="Click" in asp:AsyncPostBackTrigger

<asp:UpdatePanel ID="updatePanel2" runat="server" UpdateMode="Conditional" 
                ChildrenAsTriggers="true">
   <ContentTemplate>
    <asp:Button ID="btnBlock" class="Button" Text="BlockCalls" runat="server"       
                 onclick="btnBlock_Click" Enabled="True" Width="100px" />  
   </ContentTemplate>
   <Triggers>
     <asp:AsyncPostBackTrigger ControlID="btnBlock" EventName="Click"/> 
    </Triggers>
</asp:UpdatePanel>

Leave a Comment