简体   繁体   中英

Access master page control on web user control

i have a aspx page which is inherited from the master page and i am dynamically adding the Webuser control inside the placeholder in aspx page .

i want to acces the label which is inside the master page in my web user control .

thanks

((Label)this.Page.Master.FindControl("YourLabelNameHere")).Text = "Hello";

有一个相当不错的文章就这一议题与4guysfromrolla吨,像这样的有用的链接一个

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM