First of all, you can't mix server-side and client-side code. The reason is that the protocol that is used to communicate between client and server (i.e. HTTP) doesn't allow this.
Secondly, is this script in an external .js file or embedded in the Page itself? If it's embedded in the Page, then if you look at the source of the web page (in the menubar click on View -> Source) you will see (assuming BSCStr[i] == "test"): addr=addr + "&C" + i + "=" + test;
This means that the browser is expecting a variable named test to have been defined (which obviously hasn't been). If you surround the <%= ... %> with quotation marks, i.e. addr=addr + "&C" + i + "=" + "<%=BSCStr[i]%>";
you will see: addr=addr + "&C" + i + "=" + "test";
However, if i is defined on the client (which is what I suspect) then this won't work either. What you need to do is define an array in your JavaScript and then create a server-side loop that outputs a literal string that will, on the client, populate the array. For example:
This will result in the following: var BSCStr = new Array ( "test1", "test2", "test3" );
Finally, remove the "<%= " and "%>" from your original JavaScript.
Steven Bey
Recursion: see Recursion