最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

asp.net UpdaeProgress的簡單用法

 更新時間:2008年10月29日 22:18:01   作者:  
這個控件相比其他控件,屬性少 使用簡單,就先把這個控件的一般使用方法簡單紀(jì)錄下
UpdateProgress 應(yīng)該就是“更新進(jìn)度” 的意思吧。
使用方法:
1.添加一個ScriptManager控件
2.添加一個UpdatePanel控件
3.添加一個UpdateProgress控件
設(shè)置UpdateProgress控件的AssociatedUpdatePanelID為第2步 UpdatePanel的ID(如果頁面中有多個UpdatePanel則,只有相應(yīng)updatePanel關(guān)聯(lián)的updateProgress顯示)
測試?yán)哟a: 
復(fù)制代碼 代碼如下:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" 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 id="Head1" runat="server">
<title>Untitled Page</title>
<style type="text/css">
#UpdatePanel1, #UpdatePanel2, #UpdateProgress1 {
border-right: gray 1px solid; border-top: gray 1px solid;
border-left: gray 1px solid; border-bottom: gray 1px solid;
}
#UpdatePanel1, #UpdatePanel2 {
width:200px; height:200px; position: relative;
float: left; margin-left: 10px; margin-top: 10px;
}
#UpdateProgress3 {
width: 200px; background-color: #FFC080;
bottom: 0%; left: 0px; position: absolute;
}
#UpdateProgress2 {
width: 200px; background-color: #FFC080;
bottom: 0%; left: 0px; position: absolute;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click1" Text="Button" />
<asp:Label ID="Label1" runat="server" Text="顯示數(shù)據(jù)"></asp:Label>
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
<ProgressTemplate>
<div id="progress"><img src="img/1.gif" />
等待中...
</div>
</ProgressTemplate>
</asp:UpdateProgress>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<asp:Button ID="Button2" runat="server" OnClick="Button2_Click1" Text="Button" /><br />
<br />
<asp:Label ID="Label2" runat="server" Text="顯示數(shù)據(jù)"></asp:Label>
<asp:UpdateProgress ID="UpdateProgress2" runat="server" AssociatedUpdatePanelID="UpdatePanel2">
<ProgressTemplate>
更新數(shù)據(jù)中....
</ProgressTemplate>
</asp:UpdateProgress>
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>
</html>

c#代碼:
復(fù)制代碼 代碼如下:

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Threading;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click1(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(3000);
Label1.Text = "刷新時間:" + DateTime.Now.ToString();
}
protected void Button2_Click1(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(3000);
Label2.Text = "刷新時間:" + DateTime.Now.ToString();
}
}

其中,頁面代碼中的css是msdn上的例子。UpdatePanel1中的UpdateProgress1顯示一張動態(tài)gif圖片
還往大哥大姐們多多指教。

相關(guān)文章

  • ASP.NET中 Panel 控件的使用方法

    ASP.NET中 Panel 控件的使用方法

    Panel 控件用作其它控件的容器,其實(shí)Panel本質(zhì)就是一個DIV,本文主要介紹Panel控件的使用方法。
    2016-04-04
  • 那些年,我還在學(xué)習(xí)asp.net(二) 學(xué)習(xí)筆記

    那些年,我還在學(xué)習(xí)asp.net(二) 學(xué)習(xí)筆記

    那些年覺得看視頻是很輕松的了解一個東西,但是這樣的不足就是感覺太慢了,沒有看書來得快,所以在有了一些了解后,還得看點(diǎn)書,也許書上的不一定好,但書上會把每一個應(yīng)該說到的地方說到,好有個初步的認(rèn)識
    2012-03-03
  • ASP.NET Core中的Options選項(xiàng)模式

    ASP.NET Core中的Options選項(xiàng)模式

    這篇文章介紹了ASP.NET Core中的Options選項(xiàng)模式,文中通過示例代碼介紹的非常詳細(xì)。對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下
    2022-04-04
  • Asp.Net上傳文件并配置可上傳大文件的方法

    Asp.Net上傳文件并配置可上傳大文件的方法

    這篇文章介紹了Asp.Net上傳文件并配置可上傳大文件的方法,文中通過示例代碼介紹的非常詳細(xì)。對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下
    2022-05-05
  • ASP.NET中HyperLink超鏈接控件的使用方法

    ASP.NET中HyperLink超鏈接控件的使用方法

    本文主要介紹HyperLink控件的基礎(chǔ)用法以及在Repeater中綁定數(shù)據(jù)的一些技巧,希望能幫到大家。
    2016-04-04
  • ASP.NET中BulletedList列表控件使用及詳解

    ASP.NET中BulletedList列表控件使用及詳解

    本文主要介紹了ASP.NET中BulletedList列表控件的詳細(xì)使用方法,講解各屬性的含義以及三種顯示模式,希望能幫到大家。
    2016-04-04
  • 學(xué)會區(qū)分Visual Studio 2005,Visual Studio 2005 Team System和MSDN Premium 訂閱的各個版本

    學(xué)會區(qū)分Visual Studio 2005,Visual Studio 2005 Team System和MSDN P

    學(xué)會區(qū)分Visual Studio 2005,Visual Studio 2005 Team System和MSDN Premium 訂閱的各個版本...
    2007-01-01
  • ASP.NET?Core中的wwwroot文件夾

    ASP.NET?Core中的wwwroot文件夾

    這篇文章介紹了ASP.NET?Core中的wwwroot文件夾,對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2022-02-02
  • ASP.NET?Core中的通用主機(jī)HostBuilder

    ASP.NET?Core中的通用主機(jī)HostBuilder

    這篇文章介紹了ASP.NET?Core中的通用主機(jī)HostBuilder,文中通過示例代碼介紹的非常詳細(xì)。對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下
    2022-04-04
  • .Net中Task Parallel Library的基本用法

    .Net中Task Parallel Library的基本用法

    這篇文章介紹了.Net中Task Parallel Library的基本用法,文中通過示例代碼介紹的非常詳細(xì)。對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下
    2022-10-10

最新評論

宜良县| 榆树市| 德阳市| 南召县| 社旗县| 古蔺县| 四会市| 牡丹江市| 宁蒗| 黑河市| 周宁县| 开阳县| 涞水县| 定襄县| 洛川县| 惠来县| 琼海市| 桓仁| 平原县| 余庆县| 米易县| 桐乡市| 青州市| 南和县| 威信县| 绩溪县| 乌什县| 师宗县| 西丰县| 温宿县| 萍乡市| 礼泉县| 得荣县| 海原县| 大丰市| 宁蒗| 牙克石市| 太原市| 江川县| 商都县| 平阳县|