JavaScript alert Does not work in Firefox and Chrome

4

I'm trying to generate a wrong password alert in JavaScript. It is for a web application that works in .NET. This alert works in IE, but we're porting the system and wanted it to work in both IE and Firefox and Chrome.

ClientScript.RegisterStartupScript(this.GetType(), "js", "alert('Senha incorreta para o usuário " + txtLogin.Text + "');", true);
    
asked by anonymous 18.10.2017 / 18:28

1 answer

1

I solved the command by continuing to think that this command RegisterStartupScript does not exist in firefox and chrome. Now I've changed to:

ClientScript.RegisterClientScriptBlock(this.GetType(), "script", "alert('Senha incorreta para o usuário " + txtLogin.Text + "');", true);
    
18.10.2017 / 20:30