I have a few questions about creating controls programmatically. I have read that controls such as buttons and dropdownlists need to be created in page_load in order for their event handlers to be loaded properly and also so that they can be found using FindControl and such. I am also being told the page_load always runs before any other methods or even a button's click event method. I can create a dropdownlist directly from page load...not a big deal...but what if I wanted to create an unknown number of dropdownlists from page_load. What if the click event of a button is supposed to run a method that calculates the quanitity of dropdowns to be created in page load? If page_load does indeed fire before the button's click event (even on a PostBack), then the quantity to be created isn't really determined untill after page_load...Is this correct???
If tried using a static integer that is declared before page load, ...
Go to the complete details ...