动态加入控件的方法
protected System.Web.UI.WebControls.PlaceHolder divModuleContent;
private void Page_Load(object sender, System.EventArgs e)
{
string strModuleCode = Request.Params.Get("Module");
if (strModuleCode != null && strModuleCode.Length > 0)
{
this.divModuleContent.Controls.Add(Page.LoadControl(String.Concat(strModuleCode, ".ascx")));
}
}
private void Page_Load(object sender, System.EventArgs e)
{
string strModuleCode = Request.Params.Get("Module");
if (strModuleCode != null && strModuleCode.Length > 0)
{
this.divModuleContent.Controls.Add(Page.LoadControl(String.Concat(strModuleCode, ".ascx")));
}
}