I am creating controls which are added to the page at run time. As these controls are added I separate them into a UL/LI list by injecting literals assigned as (<ul>, </ul>,<li>,</li>). The page in question uses a master page template. The ul/li function is called in the page_load event of the child page.
I want to assign a script that collapses this list. How do I apply the script so that it will fire after all the dynamic controls have been created and added.
<body onload = > sPage.ClientScript.RegisterStartupScript(Me.GetType, "MyFunction", "setvisibility();", True)