Download Now Code Base AsyncDocs Contact Us
asyncLabel
liveDemo
  • Enter a word or phrase in the text box then click "Change AsyncLabel Text" to assign the text box value to the AsyncLabel text.
  • Click "Change the Label CSS class" to reassign a different CSS class to the AsyncLabel (this functionality is available to most AsyncControls).

This is an AsyncLabel.

Description

The AsyncLabel is one of the only AsyncControl that provides you with over 9 built-in HtmlGenericControls. When utilizing RenderMode you can render the AsyncLabel as: H1-H6, Label, Span, Div, etc.



Features
  • Has 9 render modes, giving the AsyncLabel the ability to render as 9 different HtmlGenericControls.
  • Change it's Text value during an AsyncCallback.
  • Can be scrolled into view during an AsyncCallback.
  • 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.
  • Supports many of the other properties provided by asp:Label.
  • Functions as a regular server control if the browser does not support asynchronus operations, allowing you to support legacy browsers.
   
<%@ Register Assembly="AsyncControls" Namespace="DelvingWare.AsyncControls" TagPrefix="dw" %>

<dw:AsyncButton runat="server" ID="btVisible"
CssClass="greyButton"
OnClick="btVisible_Click"
Text="Hide AsyncLabel" />
<br/>
<dw:AsyncLabel runat="server" ID="lblMain" 
    RenderMode="H4"
    CssClass="asyncLabel">This is an AsyncLabel.</dw:AsyncLabel>
<p />
<dw:AsyncTextBox runat="server" ID="txtMain" 
EnableValidation="enabled"
MaxLength="20" />

<dw:AsyncButton runat="server" ID="btMain" 
CausesValidation="true" 
OnClick="btMain_Click"
CssClass="greyButton">Change AsyncLabel Text</dw:AsyncButton>

<p />
<dw:AsyncButton runat="server" ID="btChangeCss" 
OnClick="btChangeCss_Click"
CssClass="greyButton">Change the Label CSS class</dw:AsyncButton>