how to set placeholder one after another dynamically
how to set placeholder one after another dynamically by selecting any user control from home page
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jean PaulPosted Nov 9, 2011, 2:39 AM
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);