ASP.NET CssClass Attribute
Definition and Usage
The CssClass property is used to return a CSS class style to the control.
Syntax
<asp:webcontrol id="id" CssClass="style" runat="server" />
Attribute | Description |
---|---|
style | ค่าข้อความ ค่านี้กำหนดประเภท CSS ที่ใช้บนควบคุม |
Example
ตัวอย่างนี้เป็นการตั้งค่า CSS สไตล์ของปุ่ม
<style> .TestStyle { font: 12pt verdana; font-weight:700; color:orange; } </style> <form runat="server"> <asp:Button id="Button" CssClass="TestStyle" Text="Submit" runat="server"/> </form>
Example
- Add Style to Button Using CssClass