Use Update panel like below to stop refreshing :
<asp:UpdatePanel ID="panel1" runat="server" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Btnlogin" EventName="Click" />
</Triggers>
<ContentTemplate>
//Your .aspx code
</ContentTemplate>
</asp:UpdatePanel>