Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

281
Vistas
Javascript Alert() popup not working for some users

I have a JavaScript alert popup in my .NET application and it works locally and for most users on production. But some users are complaining that it doesn't work for them on all browsers (Firefox, Chrome and IE). They are not seeing the popup on click of the button nor do they see any error. What could be the issue?

Below is the code snippet for reference -

.aspx code

<asp:Button ID="btnSubmit" runat="server" Text="Submit Registration" OnClick="btnSubmit_Click" />

.aspx.cs code

protected void btnSubmit_Click(object sender, EventArgs e)
{
 ScriptManager.RegisterClientScriptBlock((sender as Control), this.GetType(), "Registration Submitted", "alert('Your registration has been successfully submitted.'); window.location='Registration.aspx'", true);
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I had the same problem, if you run the Page.RegisterStartupScript method instead of the RegisterClientScriptBlock method, it will be fixed.

Page.RegisterStartupScript((sender as Control), this.GetType(), "Registration Submitted", "alert('Your registration has been successfully submitted.'); window.location='Registration.aspx'", true);

Or

ScriptManager.RegisterStartupScript((sender as Control), this.GetType(), "Registration Submitted", "alert('Your registration has been successfully submitted.'); window.location='Registration.aspx'", true);
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda