Download Now Code Base AsyncDocs Contact Us
asyncImage
liveDemo
Click "Random Image" to display a random image from the server.

Description

The AsyncImage is an Async-Enabled image server control, and it's one of four AsyncWebControls that give you the ability to sort.



Features
  • Can be scrolled into view during an AsyncCallback.
  • Image can be changed during an AsyncCallback.
  • Allows you to easily receive OnClick, OnMouseOver, and OnMouseOut events.
  • Supports many of the other properties provided by asp:Image.
  • Functions as a regular server control if the browser does not support asynchronus operations, allowing you to support legacy browsers.
  • Its an AsyncWebControl, which means that you can change it's visibility, CSS class, Left/Top coordinate, Width/Height, and ForeColor/BackColor, during an AsyncCallback.
   
<%@ Register Assembly="AsyncControls" Namespace="DelvingWare.AsyncControls" TagPrefix="dw" %>

<dw:AsyncButton runat="server" ID="btVisible"
CssClass="greyButton"
Text="Hide AsyncImage"
OnClick="btVisible_Click" />
<p/>
<dw:AsyncImage runat="server" ID="imgMain" 
ImageUrl="../images/imageIcon.gif"
OnClick="imgMain_Click" 
OnMouseOut="imgMain_MouseOut" 
OnMouseOver="imgMain_MouseOver" />

<dw:AsyncButton runat="server" ID="btMain" 
CssClass="greyButton"
Text="Show Random Image" 
OnClick="btMain_Click" />

<dw:AsyncLabel runat="server" ID="lblMain" 
RenderMode="bold" />