问题描述
publicstaticvoidShowMsg(System.Web.UI.PagemyPage){LabelmyLable=(Label)pg.Master.FindControl("Test");}请问这个为什么会提示对象未添加到引用呢?我的Label在MasterPage里面
解决方案
解决方案二:
要指定Master的索引
时间: 2024-09-09 06:12:07
publicstaticvoidShowMsg(System.Web.UI.PagemyPage){LabelmyLable=(Label)pg.Master.FindControl("Test");}请问这个为什么会提示对象未添加到引用呢?我的Label在MasterPage里面
解决方案二:
要指定Master的索引