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

294
Vistas
What is difference between Response.Redirect and ScriptManager.RegisterStartupScript()

I had an issue when I used Response.Redirect(url).

protected void buttonX_Click(object sender, EventArgs e)
{
    string url = $"javascript:void(window.open(https://someurl.com))";
    Response.Redirect(url);
}

it opened page in new tab but the initial page was frozen.

when I replaced that block of code with this, everything works fine :

protected void buttonX_Click(object sender, EventArgs e)
{
   string script = string.Format("window.open('{0}');", "https://someurl.com");
   ScriptManager.RegisterStartupScript(Page, Page.GetType(), "newPage" + UniqueID, script, 
   true);
}

aspx file looks like this

<telerik:RadButton ID="managerButton" runat="server" Text="redirect"
 OnClick="buttonX_Click"  ToolTip="Redirect to new page in new tab">
</telerik:RadButton>

Can anyone explain what is the difference between Response.Redirect and SriptManager.RegisterStartupScript()?

about 4 years ago · Juan Pablo Isaza
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