<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="UpdatePanelProgressExtender examples" %> <%@ Register Assembly="UpdatePanelProgress" Namespace="Vereyon.Web.UI" TagPrefix="cc1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Untitled Page</title> <link rel="stylesheet" href="StyleSheet.css" /> </head> <body> <form id="form" runat="server"> <div> <asp:ScriptManager ID="ScriptManager" runat="server"> </asp:ScriptManager> <h1>Element blocking example</h1> <div class="updatePanel"> <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <div class="updatePanelContent"> <br /> The UpdatePanelProgressExtender bound to this UpdatePanel only blocks the content of this UpdatePanel when it is updating.<br /> <br /> <asp:Button ID="updateButton1" runat="server" Text="Update panel" OnClick="updateButton1_Click" /><br /> <br /> Last update: <%=DateTime.Now.ToString() %> </div> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="updateButton1" EventName="Click" /> <asp:AsyncPostBackTrigger ControlID="externalUpdateButton1" EventName="Click" /> </Triggers> </asp:UpdatePanel> </div> <cc1:UpdatePanelProgressExtender ID="UpdatePanelProgressExtender1" runat="server" Mode="Panel" TargetControlID="UpdatePanel1" CssClass="progressMessage"> <ProgressTemplate> <img src="Images/ajax-loader.gif" alt="Loading" /> <br /> Please wait while your request is being processed... </ProgressTemplate> </cc1:UpdatePanelProgressExtender> <asp:Button ID="externalUpdateButton1" runat="server" Text="Update button outside update panel" OnClick="externalUpdateButton1_Click" /> <h1>Full blocking example</h1> <div class="updatePanel"> <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional"> <ContentTemplate> <div class="updatePanelContent"> <br /> The UpdatePanelProgressExtender bound to this UpdatePanel blocks the whole page when the UpdatePanel is updating.<br /> <br /> <asp:Button ID="updateButton2" runat="server" Text="Update panel" OnClick="updateButton2_Click" /><br /> <br /> Last update: <%=DateTime.Now.ToString() %> </div> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="updateButton2" EventName="Click" /> </Triggers> </asp:UpdatePanel> </div> <cc1:UpdatePanelProgressExtender ID="UpdatePanelProgressExtender2" runat="server" Mode="Page" TargetControlID="UpdatePanel2" CssClass="progressMessage"> <ProgressTemplate> <img src="Images/ajax-loader.gif" alt="Loading" /> <br /> Please wait while your request is being processed... </ProgressTemplate> </cc1:UpdatePanelProgressExtender> </div> <script type="text/javascript"> //<![CDATA[ $.blockUI.defaults.css = {}; //]]> </script> </form> </body> </html>
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)