当前位置: 代码迷 >> ASP.NET >> 怎么对masterpage中的控件的值进行更新
  详细解决方案

怎么对masterpage中的控件的值进行更新

热度:7509   发布时间:2013-02-25 00:00:00.0
如何对masterpage中的控件的值进行更新?
如在masterpage中设置了一个Label,要在某个子页显示当前页面,更新label的TEXT属性为当前页面的名称.
如何做?

------解决方案--------------------------------------------------------
Label lbl=(Label)master.FindControl( "Label ");
lbl.Text= "... ";
------解决方案--------------------------------------------------------
Label lb = Master.FindControl( "Label1 ") as Label;
lb.Text = Page.Header.Title;