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

280
Views
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 answers
Answer question

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 Report
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!