• <fieldset id="8imwq"><menu id="8imwq"></menu></fieldset>
  • <bdo id="8imwq"><input id="8imwq"></input></bdo>
    最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
    問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
    當前位置: 首頁 - 科技 - 知識百科 - 正文

    asp.net UpdaeProgress的簡單用法

    來源:懂視網 責編:小采 時間:2020-11-27 22:44:58
    文檔

    asp.net UpdaeProgress的簡單用法

    asp.net UpdaeProgress的簡單用法:UpdateProgress 應該就是更新進度 的意思吧。 使用方法: 1.添加一個ScriptManager控件 2.添加一個UpdatePanel控件 3.添加一個UpdateProgress控件 設置UpdateProgress控件的AssociatedUpdatePanelID為第2步 UpdatePan
    推薦度:
    導讀asp.net UpdaeProgress的簡單用法:UpdateProgress 應該就是更新進度 的意思吧。 使用方法: 1.添加一個ScriptManager控件 2.添加一個UpdatePanel控件 3.添加一個UpdateProgress控件 設置UpdateProgress控件的AssociatedUpdatePanelID為第2步 UpdatePan

    UpdateProgress 應該就是“更新進度” 的意思吧。
    使用方法:
    1.添加一個ScriptManager控件
    2.添加一個UpdatePanel控件
    3.添加一個UpdateProgress控件
    設置UpdateProgress控件的AssociatedUpdatePanelID為第2步 UpdatePanel的ID(如果頁面中有多個UpdatePanel則,只有相應updatePanel關聯的updateProgress顯示)
    測試例子代碼: 
    代碼如下:
    <%@ 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="顯示數據"></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="顯示數據"></asp:Label>
    <asp:UpdateProgress ID="UpdateProgress2" runat="server" AssociatedUpdatePanelID="UpdatePanel2">
    <ProgressTemplate>
    更新數據中....
    </ProgressTemplate>
    </asp:UpdateProgress>
    </ContentTemplate>
    </asp:UpdatePanel>
    </form>
    </body>
    </html>

    c#代碼:
    代碼如下:
    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顯示一張動態gif圖片
    還往大哥大姐們多多指教。

    聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

    文檔

    asp.net UpdaeProgress的簡單用法

    asp.net UpdaeProgress的簡單用法:UpdateProgress 應該就是更新進度 的意思吧。 使用方法: 1.添加一個ScriptManager控件 2.添加一個UpdatePanel控件 3.添加一個UpdateProgress控件 設置UpdateProgress控件的AssociatedUpdatePanelID為第2步 UpdatePan
    推薦度:
    • 熱門焦點

    最新推薦

    猜你喜歡

    熱門推薦

    專題
    Top
    主站蜘蛛池模板: 国产精品一香蕉国产线看观看 | 国产精品视频网| 国产精品亚洲欧美大片在线看| 亚洲av日韩av天堂影片精品| 国产精品午夜无码AV天美传媒| 99在线精品免费视频九九视| 中文字幕久久精品| 99久久er这里只有精品18| 精品久久久久久无码中文野结衣| 久久精品无码一区二区三区| 国产精品偷伦视频观看免费| 欧美精品v国产精品v日韩精品| 久久精品国产亚洲综合色| 免费精品久久久久久中文字幕 | 国产欧美精品专区一区二区| 精品国产污污免费网站| 国产精品亚洲片在线| 热re99久久6国产精品免费| 无码人妻精品一区二区蜜桃百度| 国产精品高清2021在线| 久久精品成人免费看| 国产韩国精品一区二区三区久久 | 日本欧美国产精品第一页久久| 国产精品福利电影一区二区三区四区欧美白嫩精品 | 欧美国产成人久久精品| 国产精品成人免费观看 | 四虎永久在线精品884aa下载| 99久久久精品免费观看国产| 精品福利一区二区三区免费视频| 少妇精品久久久一区二区三区| 亚洲欧美日韩久久精品| 亚洲国产精品无码久久九九| 日本加勒比久久精品| 亚洲精品成人在线| 国产午夜福利精品久久| 国产精品免费久久| 亚洲中文字幕久久精品无码喷水| 97久久精品人人澡人人爽| 久久久久99精品成人片试看| 欧美精品欧美人与动人物牲交| 四虎成人精品永久免费AV|