Solved

PlaceHolder and Web User Controls

Posted on 2007-11-20
1
657 Views
Last Modified: 2012-06-27
Can I add a Web User Control to an asp:PlaceHolder at runtime?

How?
0
Comment
Question by:knowlton
1 Comment
 
LVL 3

Accepted Solution

by:
john_steed earned 500 total points
ID: 20322345
Like this

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Why don't I see this table in EDMX file? 2 24
Registering DLL 5 43
Remove greater than sign 3 50
ASP.NET Core index.html  LOCALHOST page cannot be found 2 25
Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now