• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 677
  • Last Modified:

PlaceHolder and Web User Controls

Can I add a Web User Control to an asp:PlaceHolder at runtime?

How?
0
Tom Knowlton
Asked:
Tom Knowlton
1 Solution
 
john_steedCommented:
Like this

if(!Page.IsPostBack)
{
    WebUserControl1 uc =
      (WebUserControl1) Page.LoadControl("WebUserControl1.ascx");
    PlaceHolder1.Controls.Add(uc);
}
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now