User288213138 posted
Hi EssCee,
EssCee
ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "myFunction()", "myFunction();", false);
This should be true, not false. Where did you execute this code in code behind?
You can debug to see if this code is executed. Here a demo for you as a reference.
<script type="text/javascript">
function myFunction() {
alert("Hello World");
}
</script>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "myFunction()", "myFunction();", true);
}
}
Best regards,
Sam