I use the Page.ClientScript.RegisterStartupScript method, but I need print in alert the resume numbers of strDAA variable.If I have only one variable strDAA the script working, but if I have more numbers of variable strDAA the script print only last value.

I use the Page.ClientScript.RegisterStartupScript method, but I need print in alert the resume numbers of strDAA variable.If I have only one variable strDAA the script working, but if I have more numbers of variable strDAA the script print only last value.

And it would because you are using the same name for the RegisterStartupScript for each iteration. So you have two choices.

One, build your JavaScript alerts in a StringBuilder and then register a single startup script after the for loop, or Two, give a unique startup name to each iteration.

Ok, thank you.now with last modifies open window alert.but I have one window alert for each strDAA variable...the idea was to summarize in a single window alert all variables strDAA affected by changes in gridview...