2012-06-17 35 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

它們與標準頁面事件幾乎相同。 –