|
|
|
|
||||||||||||
Label Web Server ControlThe Label web server control is one of the simplest control. The output of label web server control is the HTML <span> tag. In this discussion we will see the following aspects.
Label - How can we declare a Label control?In the following example the usage of label web server control is explained. The property "Text" is used to assign a value (label) to the label control.
Test this Script Label - How to dynamically assign text to a Label?In our next example, we can observe that, we assign the text dynamically to the label control. In the page load event, the value "This is my FIRST ASP.NET Page!" is assigned to the property text.
Test this Script Label - How to show tooltip, borderwidth, forecolor, bgcolor etc.In our final example, we will see how can we make use of other properties of the label control. The properties which is shown in the following example include tooltip, borderwidth, bordercolor, backcolor and forecolor. The property, borderwidth expects a unit. That is why we have declared a variable called "bdw", which is of type unit. And to assign colors for border, background and foreground, we use the Color object. By default, the color object is not available, since we import the namespace, "system.drawing".
Test this Script Send your comments to das@aspalliance.com Back to Tutorial | ||||||||||||||
| Copyright © 2000-2003 ASPAlliance.com Page Rendered at
11/21/2009 1:20:19 PM |
||||||||||||||