-2
我想通過輸入到與此按鈕關聯的文本文件中輸入的名稱填充中繼器。但是,當我點擊按鈕時,我得到以下錯誤。方法'GetActiveInstructors'沒有超載需要2個參數
代碼:
protected void btnInsName_Click(object sender, EventArgs e)
{
try
{
DataTable dt = new DataTable();
var wingsList = context.Wings.Where(row => row.Enabled == 1).ToList();
DataTable dtDDL = new DataTable();
dtDDL = ConvertToDTForWings(wingsList);
ddlWing.DataSource = dtDDL;
ddlWing.DataBind();
var result = context.GetActiveInstructors(txtLastName.Text, txtFirstName.Text).ToList();
dt =ConvertToDTForInstructors(result);
rptInsReport.DataSource = dt;
rptInsReport.DataBind();
ViewState["ReportDataSource"] = dt;
if (result.Count != 0)
{
PrintButtons("YES");
}
else
{
PrintButtons("NO");
}
}
catch (EntityException ex)
{
NtfyObject.ServerError(Page);
}
rptInsReport.Visible = true;
}
錯誤:沒有重載方法「GetActiveInstructors」需要兩個參數
什麼是不清楚有關該錯誤消息? – 2014-11-21 01:59:14
您的方法「GetActiveInstructors」定義在哪裏? – Maxqueue 2014-11-21 02:00:23
我對缺乏信息表示歉意。做這篇文章時我很匆忙。 – SinceForever 2014-11-21 20:00:08