比如在页面中有一个用户控件,用户控件想得到页面中某Label的值(这个Label不在这个用户控件内)怎么做?

((Label)((System.Web.UI.Page)System.Web.HttpContext.Current.Handler).FindControl("test")).Text

(页面中的Label ID="test")

得到页面的其他控件同样道理

posted on 2005-04-11 21:53  powerlc  阅读(453)  评论(0编辑  收藏  举报