asp.net + Cycle through Dropdownlist
Posted on 2006-07-22
I have 11 dropdownlist that are all populated with the same data, i want to loop through each one to populate instead of listing each one at a time.
they are simply named drp1 through drp11
i have a function to populate them and call it with
populateDropDown("drp1") i enter the dropdownlist and it populates, so instead of entering 11 lines of code is there a way to loop 1 to 11 and dynamically change the dropdownlist name to send to the function