BorderWidth, BorderColor, Font-Size, Font-Name, ForeColor, BackColor , ToolTip, Visible for asp:Label (VB.net) : Label « Asp Control « ASP.Net






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

1.asp:Label background color (VB.net)
2.Set Label style (VB.net)
3.asp:label: border, font and background color
4.Do a simple calculation and set value to asp:Label (VB.net)
5.Set static asp:Label value
6.Set asp:Label text (VB.net)
7.Set color and font for an asp:Label (VB.net)
8.asp:Button action to change the asp:Label and generate random number (VB.net)
9.Your First Page: display a Text runat Server (VB.net)
10.Change Label to be visible (C#)
11.Display all page event in asp label (C#)
12.Change asp label text in asp button action (C#)
13.Assign current time to asp label (C#)
14.Define function to change Label Font to Italic (C#)
15.Set Label background color (C#)
16.Boolean value toggle: label Visible (C#)
17.Set Asp Label Text during page load (C#)
18.Asp server Label: display server time (C#)
19.Label's color