Asp 2.0动态加载用户控件(Ascx)
Aspx页面:
<asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
Aspx.Cs代码页:
Control NameControl = Page.LoadControl("~/Uc.ascx");
NameControl.ID = "UserReg";
PlaceHolder1.Controls.Add(CNVPControl);
<asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
Aspx.Cs代码页:
Control NameControl = Page.LoadControl("~/Uc.ascx");
NameControl.ID = "UserReg";
PlaceHolder1.Controls.Add(CNVPControl);
作者:Apollo
出处:http://apollo.cnblogs.com/
如果您觉得本文对您的学习有所帮助,可通过“微信”或“支付宝”打赏博主,或者点击页面右下角【好文要顶】支持博主。