.ascx文件如何读取MasterPage中控件?(ContentPlaceHolder)this.Parent.FindControl("ContentPlaceHolder1")?
.ascx文件如何读取MasterPage中ContentPlaceHolder?
ContentPlaceHolder ContentPlaceHolder1 = (ContentPlaceHolder)this.Parent.FindControl( "ContentPlaceHolder1 ");总也不成功.怎么回事?
------解决方案--------------------ContentPlaceHolder ContentPlaceHolder1 = (ContentPlaceHolder)this.Master.FindControl( "ContentPlaceHolder1 ")