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

LiveMessageBox ASP.NET Server Control Information

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

[View LiveControl Demo]

The LiveMessageBox is used to display a JavaScript alert (or prompt/confirm) to the user by using a server-side method. The alert box is displayed without any UI disruption to the user (the browser does not "refresh"). If prompt or confirm display types are used (these types require user input) when the data is received from the user, the response is sent transparently to the server, raising the Response event.

  • Use DialogType.Alert to display a message to the user.
  • Use DialogType.Confirm to display a message with a yes/no option to the user.
  • Use DialogType.Prompt to display a message with a textbox, enabling the user to input some data.
  • Use for transparent SERVER-SIDE form validation.
  • Create a step by step wizard.
  • Display error messages to the user.

Remember! Any LiveControl which raises a callback to the server (such as LiveMessageBox) raises a server event within which ANY client-side element can be visually updated without refreshing the page!

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:LiveMessageBox id="LiveMessageBox1" runat="server"></cc1:LiveMessageBox>

Code-Behind Example

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

// Prompt the user for some info.
LiveMessageBox1.Show("Please enter something:", Dart.PowerWEB.LiveControls.DialogType.Prompt);

// Response received from client
private void LiveMessageBox1_Response(object sender, Dart.PowerWEB.LiveControls.ResponseEventArgs e)
{
   LiveLabel1.Text+= "The user entered " + e.Text;
}