I have, in a telerik web application, one button making logon of the users. Look:
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Button ID="btnEntrar" runat="server" Text="Entrar" onmouseover="this.style.cursor='hand'"
OnClick="btnEntrar_Click" />
</ContentTemplate>
</asp:UpdatePanel>
In server side, i have 2 states:
if user was authenticated, response.redirect("page.aspx"),
else app sends radalert.
Look:
protected
void btnEntrar_Click(object sender, EventArgs e)
{
if ((this.txtLogin.Text == "cayo") && (this.txtSenha.Text == "123"))
{
Response.Redirect(
"Principal.aspx");
}
else
{
ScriptManager.RegisterStartupScript(this, this.GetType(), "radalerts", "radalert('Login ou senha <b>inválidos</b>! Favor verificar.', 330, 100);", true);
}
}
If i dont set RadScriptManager1.RegisterPostBackControl(this.btnEntrar); in Page_Load, radalert is work and redirect fails, else, redirect works and radalert fails.
whats to happen?