Solved

PlaceHolder and Web User Controls

Posted on 2007-11-20
1
659 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

816 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

9 Experts available now in Live!

Get 1:1 Help Now