The way to access control in sub-page witin masterpage
The way to access control in sub-page witin masterpage
The way to access control in sub-page witin masterpage:
example 1:
DropDownList ddl = (DropDownList)this.Page.Master.FindControl("ContentPlaceHolder1").FindControl(MyStatus.MyDdl);
example 2:
example 2:
TakebackSection tbs = (TakebackSection) ((AccountDetails)Page).Master.FindControl("ContentPlaceHolder1").FindControl("TakebackSection1");
here,the situation is, in a user control, we try to access another user control named "TakebackSection1", the name of sub-page is "AccountDetails"
here,the situation is, in a user control, we try to access another user control named "TakebackSection1", the name of sub-page is "AccountDetails"

浙公网安备 33010602011771号