How to apply css style in the Label control from code behind in Asp.net?

 Posted by Vivek.Ramapuram on 6/9/2015 | Category: ASP.NET Interview questions | Views: 485 | Points: 40
Answer:

In Asp.Net Label COntrol of css style is done by using "FontColor BackColor FontSize by using these in the code behind we can change the Label in Css style.

For example :
Label3.Text="This this is the text written in the css style ";

Label.Font.Names=fontNames;
Label3.Font.size=FonyUnit.Larger;
Label3.ForeColor=system.Drawing.color.Blue;
Label3.Backcolor=system.Drawing.color.yellow;

Just use the above code to test the Css style Label Controlin asp.net


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response