asp:Label background color (VB.net)
<%@ Page Language="vb" %>
<html>
<head>
<title>Control Properties Example</title>
<script runat="server">
Sub Page_Load()
Label2.BackColor = System.Drawing.Color.LightBlue
End Sub
</script>
</head>
<body>
<h1>Control Properties Example</h1>
<form runat="server">
<asp:table id="MyTable" border="1" cellpadding="5" cellspacing="0" runat="server">
<asp:tablerow runat="server">
<asp:tablecell runat="server">
Default Label:
</asp:tablecell>
<asp:tablecell runat="server">
<asp:label id="Label1" runat="server">
Hello, World!
</asp:label>
</asp:tablecell>
</asp:tablerow>
<asp:tablerow runat="server">
<asp:tablecell runat="server">
Label with Properties:
</asp:tablecell>
<asp:tablecell runat="server">
<asp:label id="Label2" font-name="arial" runat="server">
Hello, World!
</asp:label>
</asp:tablecell>
</asp:tablerow>
</asp:table>
</form>
</body>
</html>
Related examples in the same category