Praesent at massa ac enim vehicula suscipit. Mauris sed augue. Aenean lacinia, urna vitae placerat venenatis, metus mauris egestas tortor, ut hendrerit urna nisi et metus. Nunc felis ipsum, pharetra nec, iaculis vel, mattis vel, erat. Ut fringilla vulputate quam. Phasellus fermentum. Sed odio justo, pellentesque non, gravida ac, accumsan eget, mi. Nullam urna nisl, dictum nec, tincidunt quis, accumsan id, diam. Fusce rutrum.
Window content can be composed of any of the 30+ AsyncControls.
Title:
Window content can be a combination of any server or client controls.
The AsyncWindow provides you with a fast, easy-to-use, and feature rich Async-Enabled window. It can be customized in every way, from the visibility of the title bar, to the size of the collapse box button. Being built to provide a truly useful and functional window, it has the bells and whistles that make it more than unique. It even has a totally customizable shadow, featuring transparency and accurate shadow casting.
<%@ Register Assembly="AsyncControls" Namespace="DelvingWare.AsyncControls" TagPrefix="dw" %> <dw:AsyncLabel runat="server" RenderMode="H4" ID="lblMain">Multi-AsyncWindow environment</dw:AsyncLabel> <dw:AsyncButton runat="server" ID="btVisible" CssClass="greyButton" Enabled="false" OnClick="btVisible_Click">Hide Active AsyncWindow</dw:AsyncButton> <br/> <br/> <dw:AsyncLinkButton runat="server" ID="lnkVistaTheme" OnClick="lnkVistaTheme_Click">Show Vista Theme</dw:AsyncLinkButton> <br/> <dw:AsyncLinkButton runat="server" ID="lnkXPTheme" OnClick="lnkXPTheme_Click">Show Windows XP Theme</dw:AsyncLinkButton> <br/> <dw:AsyncLinkButton runat="server" ID="lnkCustomTheme" OnClick="lnkCustomTheme_Click">Show Custom Theme</dw:AsyncLinkButton> <br /> <br /> <dw:AsyncWindow runat="server" ID="wndXp" Left="200" Title="XP Theme AsyncWindow" Visible="false" EnableShadow="true" CssClass="asyncWin1" DefaultStyle="false" CloseIconUrl="../images/xpWinClose.gif" CollapseIconUrl="../images/xpWinMinimize.gif" TitleBarCssClass="titleBar1" TitleCssClass="titleBarText1" TitleBarButtonHeight="30" TitleBarButtonWidth="21" ShadowCssClass="awShadow" OnClosed="wnd_Closed" OnActivated="wnd_Activated"> </dw:AsyncWindow> <dw:AsyncWindow runat="server" ID="wndVista" Left="400" Width="500" Title="Vista Theme" EnableShadow="true" CssClass="asyncWin2" DefaultStyle="false" AllowCollapsing="false" ShadowCssClass="awShadow" CloseIconUrl="../images/vistaClose.gif" OnClosed="wnd_Closed" TitleBarCssClass="titleBar2" TitleCssClass="titleBarText2" TitleBarButtonHeight="28" TitleBarButtonWidth="42" OnActivated="wnd_Activated"> <p align="center"> Title: <dw:AsyncTextBox runat="server" ID="txtVistaTitle" EnableValidation="Enabled" ErrorMessage="Please enter a window title." ErrorMessageCssClass="errorMsg" MaxLength="25" /> <dw:AsyncButton runat="server" ID="btVistaTitle" CssClass="greyButton" CausesStrictValidation="true" OnClick="btVistaTitle_Click" Text="Change Window Title"/> </p> </dw:AsyncWindow> <dw:AsyncWindow runat="server" ID="wndCustom" Left="400" Title="Custom Theme AsyncWindow" EnableShadow="true" Visible="false" CssClass="asyncWin3" DefaultStyle="false" AllowCollapsing="true" ShadowCssClass="awShadow" CloseIconUrl="../images/cust2Close.gif" CollapseIconUrl="../images/cust2Collapse.gif" OnClosed="wnd_Closed" TitleBarCssClass="titleBar3" TitleCssClass="titleBarText3" TitleBarButtonHeight="23" TitleBarButtonWidth="20" OnActivated="wnd_Activated"> <div align="center"> <iframe src="http://www.DelvingWare.com" width="90%">AJAX for ASP.NET</iframe> </div> </dw:AsyncWindow>
using System; using DelvingWare.AsyncControls; ... protected void Page_Init(object sender, EventArgs e) { // enable AsyncWindow use AsyncPage.Invocation.EnableAsyncWindow = true; } protected void wnd_Closed( object sender, AsyncEventArgs ae ) { // update the AsyncLabel text lblMain.Text = "Closed: "+ (sender as AsyncWindow).Title; } protected void btVisible_Click( object sender, AsyncEventArgs ae ) { // get the active window from the Tag object AsyncWindow wnd = (btVisible.Tag as AsyncWindow); // close the active window wnd.Close(); } protected void wnd_Activated( object sender, AsyncEventArgs ae ) { // store the sender (the active window) btVisible.Tag = sender; // enable the AsyncButton btVisible.Enabled = true; } protected void lnkVistaTheme_Click( object sender, AsyncEventArgs ae ) { wndVista.Show(); } protected void lnkXPTheme_Click( object sender, AsyncEventArgs ae ) { wndXp.Show(); } protected void lnkCustomTheme_Click( object sender, AsyncEventArgs ae ) { wndCustom.Show(); } protected void btVistaTitle_Click( object sender, AsyncEventArgs ae ) { if ( !txtVistaTitle.IsValid ) return; // update the vista window title wndVista.Title = txtVistaTitle.Text; }
Imports System Imports DelvingWare.AsyncControls ... Protected Sub Page_Init(ByVal sender As Object, ByVal e As EventArgs) ' enable AsyncWindow use AsyncPage.Invocation.EnableAsyncWindow = true End Sub Protected Sub wnd_Closed(ByVal sender As Object, ByVal ae As AsyncEventArgs) ' update the AsyncLabel text lblMain.Text = ("Closed: " + CType(sender,AsyncWindow).Title) End Sub Protected Sub btVisible_Click(ByVal sender As Object, ByVal ae As AsyncEventArgs) ' get the active window from the Tag object Dim wnd As AsyncWindow = CType(btVisible.Tag,AsyncWindow) ' close the active window wnd.Close End Sub Protected Sub wnd_Activated(ByVal sender As Object, ByVal ae As AsyncEventArgs) ' store the sender (the active window) btVisible.Tag = sender ' enable the AsyncButton btVisible.Enabled = true End Sub Protected Sub lnkVistaTheme_Click(ByVal sender As Object, ByVal ae As AsyncEventArgs) wndVista.Show End Sub Protected Sub lnkXPTheme_Click(ByVal sender As Object, ByVal ae As AsyncEventArgs) wndXp.Show End Sub Protected Sub lnkCustomTheme_Click(ByVal sender As Object, ByVal ae As AsyncEventArgs) wndCustom.Show End Sub Protected Sub btVistaTitle_Click(ByVal sender As Object, ByVal ae As AsyncEventArgs) If Not txtVistaTitle.IsValid Then Return End If ' update the vista window title wndVista.Title = txtVistaTitle.Text End Sub
.asyncWin1 { width: 300px; border: 2px ridge #66667E; border-top: 0px; font-family: Verdana, Arial, Serif; } .asyncWin1 p, .asyncWin1 h4 { padding: 1em; } .titleBar1 { background-image: url("images/xpWindowGrad.gif"); background-repeat: repeat-x; height: 30px; } .titleBarText1 { position: relative; top: 5px; left: 10px; font-size: 9pt; font-weight: bolder; } .asyncWin2 { width: 500px; border: 2px ridge #66667E; border-top: 0px; font-family: Verdana, Arial, Serif; } .asyncWin2 h4 { padding-left: 20px; } .asyncWin2 p { padding-left: .5em; font-size: 10pt; } .titleBar2 { background-image: url("images/vistaBlueGrad.gif"); background-repeat: repeat-x; height: 28px; } .titleBarText2 { color: White; position: relative; top: 8px; left: 10px; font-size: 9pt; font-weight: bolder; } .asyncWin3 { width: 400px; border: 1px solid #66667E; border-top: 0px; font-family: Verdana, Arial, Serif; } .asyncWin3 p { padding-left: 20px; } .titleBar3 { background-image: url("images/winMacBar.gif"); background-repeat: repeat-x; height: 23px; } .titleBarText3 { color: black; position: relative; top: 4px; left: 10px; padding-left: 10px; font-size: 8pt; font-weight: bolder; } .awShadow { background-color: black; } .closebt, .collapsebt { padding-right: 2px; cursor: pointer; } .closebt img, .collapsebt img { filter: alpha(opacity=70); opacity:.7; -moz-opacity:.7; } .closebt img:hover, .collapsebt img:hover { opacity: 1; -moz-opacity:1; filter: alpha(opacity=100); }