The second parameter in
RegisterStartupScript
is
KEY
. So if the script is already added to the page with that key, it will not add it again.
So change the key If you want to execute the script again.
Using
IsStartupScriptRegistered
you can check if that key already registered on the page
Page.ClientScript.RegisterStartupScript(this.GetType(), "pro", "pro('150')", true);
for (int i = 1 ; i<=4;i++)
Page.ClientScript.RegisterStartupScript(this.GetType(), "onload", "onload()", true);
ipt(this.GetType(), "onload", "onload()", true);