Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I change the text of a label in a masterpage when loading a content page?

Tags:

c#

asp.net

vb.net

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.

Is this possible?

like image 689
Cunners Avatar asked Jul 19 '09 11:07

Cunners


1 Answers

yes, you can in this very simple way........

((Label)Master.FindControl("lblHeading")).Text = "your new text";
like image 134
Muhammad Akhtar Avatar answered Nov 09 '22 05:11

Muhammad Akhtar