안녕하세요, 업데이트를 클릭하고 OnRowUpdate 이벤트를 트리거 한 후 오류가 발생했습니다. usercontrol에서 텍스트 상자의 값을 가져 오는 올바른 형식은 무엇입니까?UserControl OnRowUpdate의 텍스트 상자 FindControl
당신은.주의 클라이언트 ID를 사용하여 컨트롤에 액세스해야에러 55 'System.Web.UI.UserControl' 'PLANID'의 정의없이 연장 방법 "PLANID '유형의 첫번째 인수 접수를 포함하지 않는'System.Web.UI.UserControl ' 볼 수 있습니다 (당신은 지시문 또는 어셈블리 참조를 사용하여 누락
protected void grd_Plan_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
string PlanCode =((UserControl)Grid_Plan.Rows[e.RowIndex].FindControl("ucPlanID")).PlanID;
}
//usercontrol code behind
public string PlanID
{
get
{
return txtPlanID.Text;
}
set
{
txtPlanID.Text = value;
}
}
멋진 작품입니다. 감사합니다. –