Asp.NetPage_Load中執(zhí)行耗時(shí)操作,不影響頁(yè)面展現(xiàn)。

實(shí)際應(yīng)用中要實(shí)現(xiàn)A頁(yè)面跳轉(zhuǎn)到B頁(yè)面,B頁(yè)面Load中執(zhí)行一些耗時(shí)的圖片處理操作,然后將處理后的圖片顯示出來(lái),為了讓B頁(yè)面先正常展現(xiàn),讓后再加載數(shù)據(jù),需要使用到VS2010中的AJAX控件:ScriptManager,UpdatePanel,Timer,UpdateProgress。

創(chuàng)新互聯(lián)是專業(yè)的永勝網(wǎng)站建設(shè)公司,永勝接單;提供成都做網(wǎng)站、網(wǎng)站制作,網(wǎng)頁(yè)設(shè)計(jì),網(wǎng)站設(shè)計(jì),建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進(jìn)行永勝網(wǎng)站開(kāi)發(fā)網(wǎng)頁(yè)制作和功能擴(kuò)展;專業(yè)做搜索引擎喜愛(ài)的網(wǎng)站,專業(yè)的做網(wǎng)站團(tuán)隊(duì),希望更多企業(yè)前來(lái)合作!

B頁(yè)面代碼:

<form id="form1" runat="server">
    <div >
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>   
            <asp:UpdateProgress ID="UpdateProgress1" runat="server">
            <ProgressTemplate>
                <div >
                    <img src="img/loading.gif" alt="Wait" />
                </div>
            </ProgressTemplate>
        </asp:UpdateProgress>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>              
                <asp:Image ID="Image1" runat="server" ImageUrl="~/img/logo.png" 
                ImageAlign="Middle" /></ContentTemplate>
                <Triggers>
                <asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
                </Triggers>
        </asp:UpdatePanel>
    </div>
    <div >
        <asp:Timer ID="Timer1" runat="server" ontick="Timer1_Tick" Interval="1000">
                </asp:Timer>
    </div>
    </form>

分享標(biāo)題:Asp.NetPage_Load中執(zhí)行耗時(shí)操作,不影響頁(yè)面展現(xiàn)。
轉(zhuǎn)載來(lái)源:http://muchs.cn/article18/ijscgp.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供微信公眾號(hào)自適應(yīng)網(wǎng)站、網(wǎng)站內(nèi)鏈、電子商務(wù)、建站公司、品牌網(wǎng)站制作

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

網(wǎng)站建設(shè)網(wǎng)站維護(hù)公司