views:

47

answers:

0

I'm creating a javascript array in an overridden PageLoad() event on a class that I'm including inside my UpdatePanel using something like this:

Page.ClientScript.RegisterArrayDeclaration("myArray", "'one','two','three'");

I have a button I'm using to "Post Back" (with ajax since it's in an update panel) that then shows a specified number of items in a .

I need to add items to my javascript array for each item in the repeater but can't seem to figure out how I can "push" more items on to the array.

I also tried using:

ScriptManager.RegisterArrayDeclaration(this, "myArray", "'one','two','three'")

in my class that I'm including within my UpdatePanel and that didn't work either...in fact that just repeated items I already had in the array.

Essentially what I'm doing to initially populate the array is finding controls on the page and filling it with information from those controls. What I'd like to do is have the controls in the repeater also added to the array, but they will be generated dynamically.

So I see one of two options as viable: either find the existing array on the page and push() more items to it, or just recreate the array on the server side method and pass it down to the client on a "postback"...neither of which have I been able to figure out.

any advice would be greatly appreciated.