Version: 1.6.1.3
Ajax technology accesses server-side power using callbacks without reloading the browser page. Easily create Rich Internet Applications without writing JavaScript!

LiveLabel ASP.NET Server Control Information

This page includes information about the LiveLabel Server Control, which is included in PowerWEB LiveControls for ASP.NET:

[View LiveControl Demo]

The LiveLabel server control represents an HTML SPAN element, and is useful in conjunction with the other controls included with LiveControls for ASP.NET as an allpurpose container for text and HTML. Simply drag a LiveLabel onto the form, drag another control on the form which raises a callback (such as a LiveButton), then manipulate the properties of the LiveLabel to perform many DHTML-style effects. Even though these properties are set on the server, since callback technology is used, the effects occur without a browser refresh.

  • Set the Text property to a text string to dynamically change the text of the span.
  • Set the Text property to an HTML string to dynamically insert an HTML element into the span.
  • Set the Display property to do a show/hide effect.
  • Use the X and Y coordinates of the LocationClick event to display the Label at a fixed location (for example, you could create a right-click popup using this technique).
  • Change the background color, border color, or border style to notify some sort of state change.
  • ...many more.

Browser Compatibility

LiveControls have been tested and are fully "callback-compatible" in the following browsers:

  • Microsoft Internet Explorer 5.0+ for Windows
  • Microsoft Interner Explorer 5.0+ for Macintosh
  • Netscape 7.1+ for Windows
  • Netscape 7.1+ for Macintosh OS X
  • Mozilla 1.3+ for Windows
  • Mozilla 1.3+ for Macintosh OS X
  • Firefox for Windows
  • Firefox for Macintosh OS X
  • Camino for Macintosh OS X
  • Konqueror based engines
  • Galeon
  • Opera 5.0+

If a browser which is not compatible accesses a page containing LiveControls, the controls will fall back to the standard ASP.NET functionality. For example, a LiveButton issues a transparent callback when clicked. If on a non-compatible page, the button will still be displayed, but will cause a standard postback when clicked.

Server Tag Example

The following tags demonstrate typical settings for initializing a LiveLabel

<cc1:LiveLabel id="LiveLabel1" runat="server">Hello world</cc1:LiveLabel>

Code-Behind Example

The following code demonstrates using the MouseEnter and MouseLeave server events to change the background color of the label.

private void LiveLabel1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.BackColor = Color.Red;
}

private void LiveLabel1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
{
    LiveLabel1.BackColor = Color.Red;
}