Calling JavaScript from C# code.

I want to call JavaScript code from C#.
I have used RegisterClientScriptBlock method to do so.
But now the problem is that this method is being called in a loop.
So, it is executed only once.
I want this code to be executed on every iteration.
How can I achieve this?
