LiveImage ASP.NET Server Control Information
This page includes information about the LiveImage Server Control, which is included in PowerWEB LiveControls for ASP.NET:
[View LiveControl Demo]
The LiveImage server control represents an HTML image which can have it's src attribute changed (as well as other client-side properties) from within a remote-scripted callback without refreshing the browser.
Remember! Any LiveControl which raises a callback to the server (such as LiveTimer) raises a server event within which ANY client-side element can be visually updated without refreshing the page!
The LiveImage control has the following features:
- Cross-browser compatible, no plugins, downloads, or security warnings.
- Use the server MouseEnter, MouseLeave effects to create an image swap effect.
- Use in conjunction with the LiveTimer to create an automated slide show.
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
- 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 LiveImage
<cc1:LiveImage id="LiveImage1" runat="server" ImageUrl="myimg.gif"></cc1:LiveImage>
The following code demonstrates using the MouseEnter and MouseLeave server events to make an image swap effect.
private void LiveImage1_MouseEnter(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
LiveImage1.ImageUrl = "image1.gif";
private void LiveImage1_MouseLeave(object sender, Dart.PowerWEB.LiveControls.LocationEventArgs e)
LiveImage1.ImageUrl = "image2.gif";