The AsyncCheckBox provides you with an Async-Enabled check box server control.
<%@ Register Assembly="AsyncControls" Namespace="DelvingWare.AsyncControls" TagPrefix="dw" %> <dw:AsyncCheckBox runat="server" ID="chkMain" Text="Check the box" OnCheckedChanged="chkMain_Checked" /> <dw:AsyncLabel runat="server" ID="lblMain" Text="Check or uncheck the AsyncCheckBox" RenderMode="H4" />
using System; using DelvingWare.AsyncControls; ... protected void chkMain_Checked( object sender, AsyncEventArgs ae ) { // update the label if ( chkMain.Checked ) lblMain.Text = "AsyncCheckBox is checked."; else lblMain.Text = "AsyncCheckBox is not checked."; }
Imports System Imports DelvingWare.AsyncControls ... Protected Sub chkMain_Checked(ByVal sender As Object, ByVal ae As AsyncEventArgs) ' update the label If chkMain.Checked Then lblMain.Text = "AsyncCheckBox is checked." Else lblMain.Text = "AsyncCheckBox is not checked." End If End Sub
.asyncChkBox1 { font-size: 8pt; font-family: Verdana; }