How to set placeholder one after another dynamically
how to set placeholder one after another dynamically by selecting any user control from home page
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Jean PaulRank #32 · 38.5K reputationPosted Nov 8, 2011, 9:39 PM EST
My understanding is that you have a user control and need to add placeholders inside it dynamically.
userControl1.Controls.Add(new PlaceHolder());
userControl1.Controls.Add(new PlaceHolder());
userControl1.Controls.Add(new PlaceHolder());
or
If you needed to create user dynamically and add to place holder..
placeHolder1.Controls.Add(LoadControl("~/UserControl.ascx") as Control);
placeHolder1.Controls.Add(LoadControl("~/UserControl.ascx") as Control);
placeHolder1.Controls.Add(LoadControl("~/UserControl.ascx") as Control);