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:
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"
 
posted @ 2009-09-03 02:57  Jian, Li  Views(145)  Comments(0)    收藏  举报