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. 从头开始编写一个Orchard网上商店模块(3) - 创建Orchard.Webshop模块项目

    原文地址:http://skywalkersoftwaredevelopment.net/blog/writing-an-orchard-webshop-module-from-scratch-par ...

  2. HTTP分段下载

    现代WEB服务器都支持大文件分段下载,加快下载速度,判断WEB服务器是否支持分段下载通过返回头是否有 Accept-Ranges: bytes 字段.分段下载分为两种,一种就是一次请求一个分段,一种就 ...

  3. XML常用颜色值

    <?xml version="1.0" encoding="utf-8" ?> <resources> <color name=& ...

  4. SR4K的API使用(libMesaSR.dll)

    看看libMesaSR.dll的导出函数: 遇到的问题: error C4430: 缺少类型说明符 - 假定为 int.注意: C++ 不支持默认 int 解决: HWND等未定义 解决: #incl ...

  5. HW4.11

    public class Solution { public static void main(String[] args) { int count = 0; for(int i = 100; i & ...

  6. HW3.6

    import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...

  7. POJ2299: Ultra-QuickSort-合并排序解决逆序数问题

    #include<iostream> #include<malloc.h> using namespace std; long long ans; void merge(int ...

  8. ural 1091. Tmutarakan Exams 和 codeforces 295 B. Greg and Graph

    ural 1091 题目链接:http://acm.timus.ru/problem.aspx?space=1&num=1091 题意是从1到n的集合里选出k个数,使得这些数满足gcd大于1 ...

  9. 开始使用storm

     开始使用storm 本章将讲述如何安装.部署.启动和停止 Storm 集群. Storm 的安装比较简单,但在安装 Storm 之前需要做好充足的准备,本章将介绍安装的整个流程.在官网上可以下载到S ...

  10. URL参数带中文,后台接收乱码解决方案

    1.前台中文参数用encodeURIComponent()进行编码,如: var textName= encodeURIComponent(name); 2.对整个URL用encodeURI()进行编 ...