BorderWidth, BorderColor, Font-Size, Font-Name, ForeColor, BackColor , ToolTip, Visible for asp:Label (VB.net)
<%@ Page Language=VB Debug=true %>
<script runat=server>
Sub Page_Load(ByVal Sender as Object, ByVal E as EventArgs)
lbl1.BorderStyle = 9
lbl1.Text = "Sample Border Style: " _
& 9
End Sub
Sub SubmitBtn_Click(Sender As Object, E As EventArgs)
lbl1.BorderStyle = txtBorderStyle.Text
lbl1.Text = "Sample Border Style: " _
& txtBorderStyle.Text
End Sub
</SCRIPT>
<HTML>
<HEAD>
<TITLE>Label Controls Sample Page</TITLE>
</HEAD>
<BODY >
<form runat="server">
<Font Face="Tahoma" Size="+1">
<asp:Label
id="lbl1"
BorderWidth="7px"
BorderColor="Blue"
Width="90%"
Font-Size="25pt"
Font-Name="Arial"
runat="server"
/>
<asp:Label
id="lbl2"
Font-Size="12pt"
Font-Bold="True"
Font-Name="Lucida Console"
ForeColor="DarkRed"
BackColor="Silver"
Text="<BR><BR>Enter a Border Style"
ToolTip="Number must be between 0 and 9"
runat="server"
/>
<BR><BR>
<asp:Label
id="lbl3"
Text="Will not see me."
Visible="False"
runat="server"
/>
<asp:TextBox
id="txtBorderStyle"
Columns="25"
MaxLength="30"
runat=server
/>
<BR><BR>
<asp:Button
id="butOK"
text="OK"
Type="Submit"
OnClick="SubmitBtn_Click"
runat="server"
/>
</Font>
</Form>
</BODY>
</HTML>
Related examples in the same category