在aspx页动态加载ascx页面内容
//加载ascx页面内容
Control c1 = this.Page.LoadControl("WebUserControl1.ascx");
//绑定到aspx页的PlaceHolder控件上
PlaceHolder1.Controls.Add(c1);
DataSet ds = SqlServerHelpr.GetDataSet("select * from dbo.Table_1");
//给GridView控件绑定数据
GridView1.DataSource = ds;
//执行绑定
GridView1.DataBind();