2012-06-17 36 views
0

我在我的MyDashboards.aspx页面中添加了一个用户控件;在aspx页面中使用OnInit属性

<uc:dlUC ID="dashboardListUserControl" runat="server" OnInit="ConfigureDashboardList" /> 

在MyDashboards.aspx.cs即代码页,我有以下功能:

public void ConfigureDashboardList(EventArgs e) 
{} 

我得到以下错误:

No overload for 'ConfigureDashboardList' matches delegate 'System.EventHandler' 

问题是什么?

回答

2

您应该添加发件人参数

public void ConfigureDashboardList(object sender,EventArgs e){} 
+0

感谢。我如何找出事件类似的参数:OnInit需要? – coolscitist

+0

它们与标准页面事件几乎相同。 –