Label change on MasterPages

B

bonokoot

Hello,

I have a MasterPage with a Label that I want to display a custom
description of the page and when the user clicks to different links on
my website I would like that description to change. Anyone have any
examples of how to do this or a site with an example?

Thanks
 
G

Guest

Hello,

I have overcome this problem with the following code.

On the page you wish to change the Label on the Master page, you simple do:

((MasterPageClassName)this.Master).LabelID.Text = "This is my new Label";

Of course you will to need to change the MastPagerClassName to your own
Master Page class and the LabelID to the name of the Label you wish to change
the text for.

Disclaimer: Any source code is posted without warranty or grantee and should
be used at your own risk.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top