[英]Using OnInit property in aspx page
我在MyDashboards.aspx頁面中添加了一個用戶控件;
<uc:dlUC ID="dashboardListUserControl" runat="server" OnInit="ConfigureDashboardList" />
在MyDashboards.aspx.cs即代碼頁中,我有以下功能:
public void ConfigureDashboardList(EventArgs e)
{}
我收到以下錯誤:
No overload for 'ConfigureDashboardList' matches delegate 'System.EventHandler'
問題是什么?
您應該添加sender參數
public void ConfigureDashboardList(object sender,EventArgs e){}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.