加载内容页时,我可以改变标签的文本在母版? [英] Can I change the text of a label in a masterpage when loading a content page?

查看:90
本文介绍了加载内容页时,我可以改变标签的文本在母版?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个母版页标签(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.

这篇关于加载内容页时,我可以改变标签的文本在母版?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆