废话不多说 直接看一个小demo
前台代码
<form id="form1" runat="server">
<div>
<asp:Panel ID="pnlAdd" runat="server">
<asp:CheckBox ID="CheckBox1" runat="server" />
<!-- 制定动态控件的位置 -->
<placeholder id="p1" runat="server"></placeholder>
<asp:Calendar ID="Calendar1" runat="server">
</asp:Calendar>
</asp:Panel>
<hr />
<asp:Button ID="btnCreate" runat="server" Text="CreateControl"
οnclick="btnCreate_Click" />
<asp:Button ID="btnRemove" runat="server" Text="RemoveContrel"
οnclick="btnRemove_Click" />
</div>
</form>