ankitweblogic logo
W e b t u t o r i a l s

Website

ASP.NET Introduction

ASP.NET Web Forms

Standard Controls

Label Control

TextBox Control

Image Control

Button Controls

Redirecting User

Using HyperLinks

RadioButton Control

RadioButtonList

CheckBox Control

CheckBoxList Control

DropDownList

ListBox Control

ImageMap Control

Master Page

View State

Event-Driven Programming

IsPostBack

ASP.NET Page Structure

Visibility of Controls

Formatting Controls

Applying CSS

Dynamic CSS

Using Style Class

Themes and Skins

Panel Control

PlaceHolder Control

AdRotator Control

Calendar Control

Validation Controls

Page Navigation

User Control

Separating Code-Presentation

Overview of ADO.NET

Data Binding

DataBinding List Control

Applying CSS to Web Controls

The base Web controls class offers only a limited number of properties. You can use Cascading Style Sheets (CSS) with Web controls to apply a large variety of formatting styles to Web pages. You can use CSS attributes with Web controls in the same way as with HTML tags.

The simplest way to use CSS is to apply CSS attributes to the Style property of a Web control.
<asp:Label id="lblMsg" runat="server" Style="font:18pt Script" text="This is a Label" />

Output

Using Css Property