I cannot get Javascript to run after a ASP.NET postback from a client script block injected from a master page
Below is my master page logic, and it gets hit on a postback, I have confirmed with a breakpoint.
namespace MyAwesomeProjectThatWillTakeOverTheWorldIfNotForThisIssue
{
public partial class CommonContent : MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
Page.ClientScript.RegisterClientScriptBlock(GetType(),
"script",
"alert('Success!');",
true);
}
}
}
The problem is the alert popup only appears on the first load but not on postback.
What am I not doing right?