加载内容页时,我可以改变标签的文本在母版?
问题描述:
我有一个母版页标签(sample.master)呼吁lblHeading。
I have a label in a master page (sample.master) called lblHeading.
我要动态地更改标签的文本时我加载页面内容。
I want to dynamically change the text of the label when I load the content page.
我需要做的,因为我想改变航向为有意义的,但只有在我知道的网页内容。
I need to do this because I want to change the heading to something meaningful but only after I know about the content of the page.
这可能吗?
答
是
您想创建一个强型主页然后你就可以访问它的属性从您的内容页面中的Page_Load或任何其他地方。
You want to create a strongly-type master page and you can then access it's properties from your content page during Page_Load or wherever else.