I am writing an asp.net website and im trying to use the asp.net button. Though the code behind is correct and i used the update panel, every time i click on the button the code behind does not execute and instead of that the page reloads. Can you please help me?
Here is the part of the code i use the button:
<div class="row">
<div class="col-lg-8 col-md-offset-4 padding-left-0 padding-top-20">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel runat="server" ID="UpdatePanel" UpdateMode="Conditional" >
<ContentTemplate>
<asp:Button class="btn btn-primary" ID="btnLogin" runat="server" Text="Log in" OnClick="btnLogin_Click" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnLogin" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
</div>
</div>