在自定义WebUserControl中访问PAGE/master/或其它控件中的对象

因为要达到如题的目的
研究了一下

文档内容关系如下

master-------------------------------------------------------------------------------------------
|                               |                                                                              |
|                           cpm(ContentPlaceHolder)                            ml(WebUserControl)
---- default.asp                                                                                    | 
                |                                                                                        myq(LinkButton)
              C1(cmp)
                |
               Phmain(PlaceHolder)
              

在单击myq中对phmain进行操作visable属性操作
在myq的click中
通过Me.Parent.FindControl("cpm").FindControl("phmain")来得到phmain
Dim  ph  As  PlaceHolder  =  ( Me .Parent.FindControl( " cpm " ).FindControl( " phmain " ))
ph.Visible 
=   True
一样的,可以用Me.master得到master中的对像

你可能感兴趣的:(c,文档)