Can’t get ScriptManager.RegisterStartupScript in WebControl nested in UpdatePanel to work
I had an issue using this in a user control (in a page this worked fine); the Button1 is inside an updatepanel, and the scriptmanager is on the usercontrol. protected void Button1_Click(object sender, EventArgs e) { string scriptstring = “alert(‘Welcome’);”; ScriptManager.RegisterStartupScript(this, this.GetType(), “alertscript”, scriptstring, true); } Now it seems you have to be careful with … Read more