I want to dynamically add a web user control to a web form. Everything I've read so implies that I should be able to use the PlaceHolder web server control for this, yet I cannot this to work. I've created a simple test to just try to master this concept, yet I can only get non-web user controls added. Can anyone tell me what I'm doing wrong? Below is the entirety of my code. Thanks.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ControlTestPage.aspx.cs" Inherits="ControlTestPage" %>
<%@ Register Src="~/testControl.ascx" TagName="tCtl" TagPrefix="Custom" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<form id="form1" runat="server">
<Custom:tCtl ID="tCtl" runat="server" /> <br /> <br />
<asp:PlaceHolder ID="mainPlc" runat="server"></asp:PlaceHolder>
View Complete Post