hi strickdd
i probably didnt word my question right. I only want to output this code on one page but this page is a content page based on a master page instead of a normal webform. Therefore, i dont have head tags at the top. I understand one way to solve my problem would be to write the javascript dynamically in the code behind getting the client IDs and using something like RegisterStartupScrtip or whatever the method is called.
I dont understand your options 2 and 3 but i would use option 1 anyway probably. I was looking for an easier way thats all
Main Topics
Browse All Topics





by: strickddPosted on 2007-08-29 at 05:06:30ID: 19790364
Things get pretty hairy if you want to do things this way... You have several options:
1) Writing the javascript dynamically in the masterpage in the Page_PreRender (or earlier) by looping through all the controls in the content portion and getting their client ID's.
2) Creating an Array variable in javascript that will contain the controls ClientID's on the page. Putting this at the top of the HTML section, then having each content page populate this variable with its control client id's.
3) Do it on each page instead of the Masterpage.