----前台
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm38.aspx.cs" Inherits="WebApplication2.WebForm38" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %><html xmlns=""><head runat="server"> <title></title> <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script> <script src="Scripts/jquery.blockUI.js" type="text/javascript"></script></head><body>
<form id="form1" runat="server"> <cc1:ToolkitScriptManager ID="ScriptManager" runat="server"> </cc1:ToolkitScriptManager> <cc1:UpdatePanelAnimationExtender ID="UpdatePanelAnimationExtender1" runat="server" TargetControlID="UpdatePanel1"> <Animations> <OnUpdating> <Sequence> <ScriptAction script="ajaxStart();" /> </Sequence> </OnUpdating> <OnUpdated> <sequence> <ScriptAction script="ajaxStop();" /> </sequence> </OnUpdated> </Animations> </cc1:UpdatePanelAnimationExtender> <asp:UpdatePanel runat="server" ID="UpdatePanel1"> <ContentTemplate> <asp:Button ID="Button1" runat="server" Text="Button" οnclick="Button1_Click"></asp:Button> </ContentTemplate> </asp:UpdatePanel> </form></body></html>--后台using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Threading;namespace WebApplication2
{ public partial class WebForm38 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) {}
protected void Button1_Click(object sender, EventArgs e)
{ Thread.Sleep(1000);}
}}