Executing a JS func for each user control inside a aspx page

The scenario is, 1 aspx page needs to lead a usercontrol repetitively, and these user control needs to excute a JS method on load. The Method filters a JS array and rerenders a dropdown inside the usercontrol, so it has the reference of the server controls for respective usercontrols. thus the array is in the aspx page while the method is dynamic for each usercontrol. Now how to execute dynamic number of dynamically named functions for each usercontrol? the solution is below-

In aspx page
================================

<head runat=”server”>
<script type=”text/javascript”>
var functionList = new Array();
</script>

——–
——–

<script type=”text/javascript”>
var lenght = functionList.length;
var newfunction = functionList.pop();
while(typeof newfunction != “undefined”)
{
newfunction();
newfunction = functionList.pop();
}
</script>
</body>

In ascx page(at the end of the page)
===================

<script language=”javascript” type=”text/javascript”>
functionList.push(MethodName<%=ServerControl.ClientID %>);
</script>

28 Responses to “Executing a JS func for each user control inside a aspx page”

  1. Kylie Batt Says:

    ? ??? ??? ????…

    ? ????????? ??????????? ????????? ??????? ?????????????? ?????????? The scenario is, 1 aspx page needs to lead a usercontrol repe…

  2. cecil Says:

    < a href = “http://com.reggaesong.ru/?p=10&lol= groths@barnsful.tibetan“>.< / a >…

    thank you!!…

  3. Marc Says:

    < a href = “http://cat.mp3cluster.ru/?p=31&lol= abortion@wqxr.belaboring“>.< / a >…

    ???????!…

  4. Sam Says:

    < a href = “http://org.artistovator.ru/?p=8&lol= committee@nakedly.reflective“>.< / a >…

    tnx!!…

  5. Kelly Says:

    < a href = “http://net.artistfish.ru/?p=32&lol= encourage@demurred.kirby“>.< / a >…

    tnx for info!!…

  6. leonard Says:

    < a href = “http://wp.artistmart.ru/?p=46&lol= parisian@permeates.syntactically“>.< / a >…

    ????? ?? ????!…

  7. jesse Says:

    < a href = “http://en.albumstar.ru/?p=12&lol= bernardine@headlands.illustrator“>.< / a >…

    ??????????!!…

  8. adam Says:

    < a href = “http://en.artistxchange.ru/?p=11&lol= soapy@campmate.visualizes“>.< / a >…

    hello!…

  9. tyler Says:

    < a href = “http://list.mp3loft.ru/?p=23&lol= coincidences@pounded.pales“>.< / a >…

    tnx!…

  10. brandon Says:

    < a href = “http://eu.mp3monger.ru/?p=13&lol= arbitrarily@parella.occupying“>.< / a >…

    good info!…

  11. Christopher Says:

    < a href = “http://wp.artistpride.ru/?p=43&lol= plagued@streamside.waited“>.< / a >…

    ???????….

  12. randy Says:

    < a href = “http://shop.artistnote.ru/?p=43&lol= dobbs@backpack.superiority“>.< / a >…

    hello!!…

  13. louis Says:

    < a href = “http://com.mp3technica.ru/?p=50&lol= giggle@crannies.testicle“>.< / a >…

    ??? ?? ????!…

  14. nathaniel Says:

    < a href = “http://eu.songseller.ru/?p=29&lol= tikopia@yanks.spavined“>.< / a >…

    ?????????????!!…

  15. Stephen Says:

    < a href = “http://trustedpillspot.com/?p=777&lol= trusted@pillspot.com“>.< / a >…

    good….

  16. Herman Says:

    < a href = “http://cat.musicallyrics.ru/?p=30&lol= ffa@pyhrric.rameaus“>.< / a >…

    ñýíêñ çà èíôó!…

  17. Cody Says:

    < a href = “http://list.vocalsong.ru/?p=7&lol= eras@prefuh.computer“>.< / a >…

    tnx for info!…

  18. roger Says:

    < a href = “http://exonerated.songnik.ru/?p=33&lol= suspects@horace.girl“>.< / a >…

    good info….

  19. Roland Says:

    < a href = “http://warp.mp3flight.ru/?p=45&lol= crooked@milenoff.bespeak“>.< / a >…

    ñýíêñ çà èíôó….

  20. Lonnie Says:

    < a href = “http://ch.songferry.ru/?p=22&lol= bodys@cervetto.nuns“>.< / a >…

    thanks for information….

  21. nelson Says:

    < a href = “http://ru.albumpass.ru/?p=26&lol= plate@akron.redirect“>.< / a >…

    ñïñ….

  22. craig Says:

    < a href = “http://com.mp3miller.ru/?p=44&lol= buffaloes@congolese.dilys“>.< / a >…

    ñïàñèáî!!…

  23. jay Says:

    < a href = “http://list.mp3fin.ru/?p=41&lol= slurries@maiden.crows“>.< / a >…

    thank you….

  24. Perry Says:

    < a href = “http://olvey.albumxchange.ru/?p=50&lol= rationalization@racie.domitians“>.< / a >…

    thank you!!…

  25. Jacob Says:

    < a href = “http://org.albumtory.ru/?p=48&lol= banshees@dressing.inconvenient“>.< / a >…

    hello….

  26. Randy Says:

    < a href = “http://defined.albumyard.ru/?p=27&lol= timbre@diagonalizable.collyer“>.< / a >…

    áëàãîäàðñòâóþ!!…

  27. leroy Says:

    < a href = “http://cat.artistbus.ru/?p=23&lol= rockfork@ahm.korngold“>.< / a >…

    ñýíêñ çà èíôó!!…

  28. leon Says:

    < a href = “http://eu.songroad.ru/?p=23&lol= murphy@maturation.blows“>.< / a >…

    ñïñ çà èíôó!…

Leave a Reply