UpdateProgress是一个进度显示条,加在AJAX里能显得更加的人性化(个人认为)。现在我们就开始吧: 第一.新建一个AJAX项目。在页面上加上ScriptManager,UpdatePanel,UpdateProgress,同时在UpdatePanel中加入一个Label,和Button。 第二:选中UpdateProgress的AssociatedUpdatePanelID设置为UpdatePanel1,完整的HTML代码如下:

<%@ Register     Assembly="AjaxControlToolkit"     Namespace="AjaxControlToolkit"     TagPrefix="ajaxToolkit"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title>无标题页</title> </head> <body>     <form id="form1" runat="server">     <div>         <asp:ScriptManager ID="ScriptManager1" runat="server">         </asp:ScriptManager>         </div>         <asp:UpdatePanel ID="UpdatePanel1" runat="server">             <ContentTemplate>                 &nbsp;<asp:Label ID="Label1" runat="server" Text="Label" Width="166px"></asp:Label>&nbsp;                 <br />                 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;                 <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Button"/>             </ContentTemplate>         </asp:UpdatePanel>         <asp:UpdateProgress ID="testUp" runat=server AssociatedUpdatePanelID="UpdatePanel1">             <ProgressTemplate>                 progressing..             </ProgressTemplate>                    </asp:UpdateProgress>     </form> </body> </html>

第三,在BUTTON中加入点击事件,代码如下:

);         Label1.Text =  DateTime.Now.ToString();

主要是故意创建一个延迟,显示效果。 最后,运行就ok了

UpdateProgress使用的更多相关文章

  1. ASP.NET AJAX入门系列(7):使用客户端脚本对UpdateProgress编程

    在本篇文章中,我们将通过编写JavaScript来使用客户端行为扩展UpdateProgress控件,客户端代码将使用ASP.NET AJAX Library中的PageRequestManager, ...

  2. ASP.NET AJAX入门系列(6):UpdateProgress控件简单介绍

    在ASP.NET AJAX Beta2中,UpdateProgress控件已经从“增值”CTP中移到了ASP.NET AJAX核心中.以下两篇关于UpdateProgress的文章基本翻译自ASP.N ...

  3. Unity游戏内版本更新

    最近研究了一下游戏内apk包更新的方法. ios对于应用的管理比较严格,除非热更新脚本,不太可能做到端内大版本包的更新.然而安卓端则没有此限制.因此可以做到不跳到网页或应用商店,就覆盖更新apk包. ...

  4. iOS开发系列--音频播放、录音、视频播放、拍照、视频录制

    --iOS多媒体 概览 随着移动互联网的发展,如今的手机早已不是打电话.发短信那么简单了,播放音乐.视频.录音.拍照等都是很常用的功能.在iOS中对于多媒体的支持是非常强大的,无论是音视频播放.录制, ...

  5. iOS开发系列--网络开发

    概览 大部分应用程序都或多或少会牵扯到网络开发,例如说新浪微博.微信等,这些应用本身可能采用iOS开发,但是所有的数据支撑都是基于后台网络服务器的.如今,网络编程越来越普遍,孤立的应用通常是没有生命力 ...

  6. iOS空心圆下载进度指示器控件

    self.layer = [CAShapeLayer layer]; self.layer.frame = CGRectMake(, , , ); self.layer.position = self ...

  7. PHP 文件下载 显示进度条

    前台调用:js调用: function downloadfile(id,name,price,curcount_pricelimit){ Date.prototype.Format = functio ...

  8. c# 局域网文件传输实例

    一个基于c#的点对点局域网文件传输小案例,运行效果截图 //界面窗体 using System;using System.Collections.Generic;using System.Compon ...

  9. 小知识 安卓线程和ui

    *:first-child { margin-top: 0 !important; } body>*:last-child { margin-bottom: 0 !important; } /* ...

随机推荐

  1. flume服务的搭建

    搭建前先统一时间,关闭防火墙,使用的jar包版本是1.6.0的 服务配置有两种方式 第一种:具体步骤如下: 1.将jar包传至node1上,解压至根目录 2.更改目录名,使用如下命令:mv apach ...

  2. bzoj 1924 [Sdoi2010]所驼门王的宝藏(构图,SCC,DP)

    Description Input 第一行给出三个正整数 N, R, C. 以下 N 行,每行给出一扇传送门的信息,包含三个正整数xi, yi, Ti,表示该传送门设在位于第 xi行第yi列的藏宝宫室 ...

  3. spring 的配置 bean>>property>>name属性

    <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...

  4. List使用Foreach 修改集合时,会报错的解决方案 (Error: Collection was modified; enumeration operation may not execute. ) - 摘自网络

    当用foreach遍历Collection时,如果对Collection有Add或者Remove操作时,会发生以下运行时错误: "Collection was modified; enume ...

  5. puppet重申证书

    直接上步骤,由于测试用的是PE3.X版本,在网上搜的命令几乎与PE相关的puppet命令不同了, 1.在PE-Client操作,停止pe-puppet,pe-mcollective资源; puppet ...

  6. 使用AFNetworking 报错提示

    使用AFNetworking 框架 解析数据 报错提示数据请求失败Error Domain=NSCocoaErrorDomain Code=3840 "The operation could ...

  7. php数组相加 两个数组键名相同 后者不能覆盖前者

    array(“a”)+array(“b”)结果还是array(“a”) array(“a”)+array(“b”)的结果是 array(“a”) 因为,它们等效于array(“0″=>”a”)+ ...

  8. ASP.NET MVC- 布署

    IIS6.0 1. 安装Microsoft .net FrameWork 4.0安装包; 2. 安装ASP.NET MVC 3; 3. 设置“Web扩展服务”中的“ASP.NET v4.0.0.303 ...

  9. 用Natvis定制C++对象在Visual Studio调试时如何显示

    博客搬到了fresky.github.io - Dawei XU,请各位看官挪步.最新的一篇是:用Natvis定制C++对象在Visual Studio调试时如何显示.

  10. 一个tomcat究竟能接受多少并发

    maxThreads 对tomcat来说,每一个进来的请求(request)都需要一个线程,直到该请求结束.如果同时进来的请求多于当前可用的请求处理线程数,额外的线程就会被创建,直到到达配置的最大线程 ...