Author: tmptplayer | Posted on: 10/3/2010 5:24:05 AM | Views : 391

Hello,
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.
.aspx Page:

<%@ 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"> <html xmlns="http://www.w3.org/1999/xhtml"> <head run ...

Go to the complete details ...