Click here to Skip to main content
15,894,539 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to change the formatting of master page control in inner page .cs page in asp.net
i have 1 label on master page
i want to give some formatting or color to label on inner page.cs .
firstly we have to find the control of master page...i have done
but after that what should i do..?
Posted
Updated 21-Oct-11 21:32pm
v2

1 solution

Hi,

you can change any thing in master from child page

C#
Label lblch=new Label();
lblch=(Label)Master.FindControl("Lblname");
lblch.ForeColor=Syste.Color.Red;
lblch.Cssclass="heading";


All the Best
 
Share this answer
 
Comments
soniya sangal 22-Oct-11 4:29am    
Thankx

can we apply span on label??
Muralikrishna8811 22-Oct-11 4:30am    
can can
soniya sangal 22-Oct-11 4:32am    
how????
Muralikrishna8811 22-Oct-11 4:34am    
What you wanna apply for that label
soniya sangal 22-Oct-11 4:38am    
i wanna add span to lable..
how can we do??/?

thx

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