javascript - alert showing once instead of several times ScriptManager asp.NET -


i experience issue using alert('mytext'); through scriptmanager.registerstartupscript().

the problem is, when use in loop, example, writting :

for(int = 0; < 3; i++) {     scriptmanager.registerstartupscript(page, page.gettype(), "alert", "alert('hello world');", true); } 

the alert displayed once, instead of 3 times.

to precise, function takes 5 parameters, :

  • control control : control of page
  • type typeofcontrol : type of control
  • string key : key used identify js script
  • string script : js script itself
  • boolean addscripttags : put script <script></script> or not

the essence of problem can't specify key. tryied use milliseconds identify each script seems script faster , have same amount of millisecond (and cannot more precised time...).

question : how use possible unique idenifier key parameters ? or there alternative ?


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -