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

292
Views
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
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!