【发布时间】:2010-02-11 00:20:55
【问题描述】:
我正在像这样以编程方式加载用户控件:
protected void Page_Load(object sender, EventArgs e)
{
// LinqDataSource1.TableName = string.Format("{0}s", _table.Context.Mapping.GetMetaType(_type).Name);
_control = Page.LoadControl(typeof(CatalogoGenerico), new object[] { typeof(CTG_ENT_ENTIDAD) }) as CatalogoGenerico;
PlaceHolder1.Controls.Add(_control);
}
使用这个构造函数:
public CatalogoGenerico(Type type):this()
{
_db = new DataClasses1DataContext();
_type = type;
}
我的问题是我的用户控件中的所有控件都是空的,我还需要做些什么来加载子控件吗?
【问题讨论】: