Click here to Skip to main content
15,909,325 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi..

I have small doubt..

If i have label control in master page header.that label value/text will be changed after navigation to next page ,other pages.How to do this please help me.

i tried like
in aspx page:
page load();
 Label lbl = (Label)Page.master.findcontrol("lbl");
lbl.text ="fggf";


Is there is any other way to change label text..please help me

Thanks in advance
Posted

Use the public properties is one of theway.
 
Share this answer
 
You have to see the event firing mechanism here, when master pages in place, you can expose the label control as a property as shown below:
C#
public Label NameLabel
{
  get { return lbl; }
  set { lbl = value; }
}

Access NameLabel in the code, also keep in mind application life cycle with master pages, your issue get solved here
 
Share this answer
 
v2
Comments
Ganesh_mca 25-Jun-12 2:46am    
Thanks..bro..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900