I think this is due to the fact that the trigger is only valid when you are not logged in.
The button does not exist if you are logged in.
If you trigger a partial postback in a control inside the panel, you don’t need to use a special trigger from what I remember.
What happens if you choose this as follows:
<asp:UpdatePanel ID="UpdatePanel2" runat="server"> <ContentTemplate> <asp:LoginView ID="LoginView1" runat="server"> <AnonymousTemplate> <asp:Button ID="btnLogin" runat="server" Text="Iniciar sesión" OnClick="btnLogin_Click" /> </AnonymousTemplate> <LoggedInTemplate> <asp:TextBox ID="txtPassword" runat="server" Text="You're in"/> </LoggedInTemplate> </asp:LoginView> </ContentTemplate> </asp:UpdatePanel>
source share