Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

295
Views
¿Cuál es la diferencia entre Response.Redirect y ScriptManager.RegisterStartupScript()

Tuve un problema cuando usé Response.Redirect (url).

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

abrió la página en una nueva pestaña pero la página inicial estaba congelada.

cuando reemplacé ese bloque de código con esto, todo funciona bien:

 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); }

el archivo aspx se ve así

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

¿Alguien puede explicar cuál es la diferencia entre Response.Redirect y SriptManager.RegisterStartupScript()?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!