用户控件的动态加载
时间:2010-08-18 来源:空紫竹
//Load
UserControl c1 = (UserControl)LoadControl("ucCheckBoxGroup.ascx");
c1.ID = "_UserGroups";
//Set Property
Type c1Type = c1.GetType();
System.Reflection.PropertyInfo c1PInfor = c1Type.GetProperty("ConnectionString");
c1PInfor.SetValue(c1,strConn, null);
//display
//Page.Controls.Add(c1)
C.Controls.Add(c1);
UserControl c1 = (UserControl)LoadControl("ucCheckBoxGroup.ascx");
c1.ID = "_UserGroups";
//Set Property
Type c1Type = c1.GetType();
System.Reflection.PropertyInfo c1PInfor = c1Type.GetProperty("ConnectionString");
c1PInfor.SetValue(c1,strConn, null);
//display
//Page.Controls.Add(c1)
C.Controls.Add(c1);
相关阅读 更多 +
排行榜 更多 +








![《小朋友齐打交2复刻版》 v2.14d升级档+未加密补丁[TENOKE]](https://images.phpfans.net/img/f1/20251229/logo_69527f2a9daf81.jpg)

