Loading controls dynamically
-
-
I would like to know is it possible to load controls dynamically other than in pageload. I tried the same the dynamically created controls are not behaving properly. They are sometimes visible and not visible. The events get triggered abnormally. Padvit
Hi there, IMO, the reason your dynamically added controls do not run properly is that you don't reinsert them in the right place. Basically, your dynamic controls need to be added every time the page is loaded and they should be reinserted previous to loading of the view state and reloading of postback data, otherwise the postback events of the controls don't run properly. For more information, you can see Control Execution Lifecycle[^] You may also find this article[^] (Scott Mitchell) as a very good example of working with dynamic controls.
-
Hi there, IMO, the reason your dynamically added controls do not run properly is that you don't reinsert them in the right place. Basically, your dynamic controls need to be added every time the page is loaded and they should be reinserted previous to loading of the view state and reloading of postback data, otherwise the postback events of the controls don't run properly. For more information, you can see Control Execution Lifecycle[^] You may also find this article[^] (Scott Mitchell) as a very good example of working with dynamic controls.
-
Hi thank you once again. The information is very useful. I find always answers for all of my question from you thats really great. Can you give me introduction of your self just interested to know about you. Padvit