- //usercontrol.IndexOper为自定义控件
- usercontrol.IndexOper uc = (usercontrol.IndexOper)Page.LoadControl("自定义控件路径");
- uc.ID = "uc"; //定义唯一标示
- //OperContent为PlaceHolder控件
- OperContent.Controls.Add(uc);
- //该片段来自于http://www.codesnippet.cn/detail/290720134853.html
来源: http://www.codesnippet.cn/detail/290720134853.html