在aspx母页面中有添加公共方法:
public void ShowChart(int ChartType)
{
..
}
在用户控件ascx文件中使用映射调用母页面的方法;
System.Web.UI.Page p = this.Page;
Type pageType = p.GetType();
MethodInfo mi = pageType.GetMethod("ShowChart");
mi.Invoke(p, new object[] { this.ddlChartType.SelectedIndex });
public void ShowChart(int ChartType)
{
..
}在用户控件ascx文件中使用映射调用母页面的方法;
System.Web.UI.Page p = this.Page;
Type pageType = p.GetType();
MethodInfo mi = pageType.GetMethod("ShowChart");mi.Invoke(p, new object[] { this.ddlChartType.SelectedIndex });


浙公网安备 33010602011771号