Make Label text Bold, Italic and change bacground color programmatically in Asp .Net

 Write a program to change text of Label control to Bold, Italic and change its Background and Forecolor programmatically.


<%--//===== Label to show output.--%>


protected void btnBold_Click(object sender, EventArgs e)
        lblResult.Font.Bold = true;
    protected void btnItalic_Click(object sender, EventArgs e)
        lblResult.Font.Italic = true;
    protected void btnBackGroundColor_Click(object sender, EventArgs e)
        lblResult.BackColor = Color.Blue;
        lblResult.ForeColor = Color.White;

Final Output


We are nothing without our users ! You can help us offer even more high quality content. Please share our page !
Best quality Asp .Net Ajax Control Toolkit tutorials.
how to highlight textbox value in gridview in when searching for a value
22-Nov-2013 From  reddy

Give your valuable comments.

6 + 1 =
About Us | Terms of Use | Privacy Policy | Disclaimer | Contact Us Copyright © 2012-2023 CodingFusion
75 Important SQL Server queries you should know