国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發(fā) > AJAX > 正文

AJAX應用帶標題更新

2024-07-21 02:26:10
字體:
來源:轉載
供稿:網(wǎng)友
中國最大的web開發(fā)資源網(wǎng)站及技術社區(qū),

這里的一個應用是updateprogress的應用完善。為了給用戶顯示的效果更好而設計。你可以參看效果:

http://szhxy.gliet.edu.cn/qxgl/登錄顯示的更新過程。

代碼如下:


<%@ page language="c#" autoeventwireup="true" codefile="default.aspx.cs" inherits="_default" %>

<!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 runat="server">
<style type="text/css">
#updatepanel1 ...{
  width: 300px;
  height: 100px;
  border:solid 1px gray;
}   
</style>
    <title>更新測試</title>
</head>
<body>

    <form id="form1" runat="server">
        <asp:scriptmanager id="scriptmanager1" runat="server" enablepagemethods="true" enablescriptglobalization="true" >

        </asp:scriptmanager>
        <div visible="false">
            <asp:updateprogress id="updateprogress1" runat="server" associatedupdatepanelid="updatepanel1" displayafter="0">
                <progresstemplate>
                                   
                <div id="progress" >
                   
            <table cellpadding="4" cellspacing="0" >
            <tr>
                <td >
                <span >&nbsp;<strong>系統(tǒng)提示</strong></span></td>
            </tr>
            <tr>
                <td  valign="middle" >
                <br />
                <br />
                <img alt="waiting..." src="http://www.pushad.com/info/indicator_mozilla_blu.gif" />
                <span >正在處理,請稍后……</span></td>
            </tr>
    </table>
                </div>
                </progresstemplate>
            </asp:updateprogress>
        </div>

        &nbsp; &nbsp;&nbsp; &nbsp;
        <asp:updatepanel id="updatepanel1" runat="server">
            <contenttemplate>
                &nbsp; 密碼:<asp:textbox id="textbox2" runat="server"></asp:textbox>
                <br />
                密碼確認:<asp:textbox id="textbox1" runat="server"></asp:textbox>
        <asp:button id="button1" runat="server" onclick="button1_click" text="button" />
            </contenttemplate>

        </asp:updatepanel>
        &nbsp;
    </form>   
</body>
</html>

cs代碼:
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;

public partial class _default : system.web.ui.page
...{
    protected void page_load(object sender, eventargs e)
    ...{

    }
    protected void button1_click(object sender, eventargs e)
    ...{
        //system.threading.thread.sleep(3000);
        int j = 0;
        for (int i = 0; i < 100000000; i++)
        ...{
            j = i+j;
       
        }
            if (textbox1.text.equals(textbox2.text))
            ...{
                response.redirect("/login.aspx");
            }
            else
            ...{
                response.redirect("/error.aspx");
            }
      
    }

}

不過根據(jù)研究,http://szhxy.gliet.edu.cn/qxgl/login.aspx?returnurl=%2fqxgl%2fdefault.aspx使用的方法如下:
他是通過調(diào)用htm文件實現(xiàn)圖像顯示的。

將表單代碼去掉替換如下:
<iframe scrolling="no" frameborder="0" marginwidth="0" marginheight="0" src="bar.htm" /></iframe>

可見還需要一個bar.htm。這樣我們就建個:
<!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>
    <title>系統(tǒng)提示</title>
</head>

<body >
    <table cellpadding="4" cellspacing="0" >
            <tr>
            <td >
                <span >&nbsp;<strong>系統(tǒng)提示</strong></span></td>

        </tr>
        <tr>
            <td  valign="middle" >
                <br />
                <br />
                <img alt="waiting..." src="http://www.pushad.com/info/indicator_mozilla_blu.gif" />
                <span >正在處理,請稍后……</span></td>
        </tr>

    </table>

</body>
</html>

測試通過

 

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 旬邑县| 昌平区| 上饶县| 天等县| 临武县| 博乐市| 广昌县| 娄底市| 郸城县| 思茅市| 九台市| 察雅县| 大同县| 和龙市| 华宁县| 云南省| 义乌市| 南通市| 大埔县| 曲阜市| 天长市| 香格里拉县| 阳新县| 维西| 集安市| 岑溪市| 左权县| 鄂伦春自治旗| 乐至县| 蓝田县| 叙永县| 南江县| 镇宁| 三亚市| 赣州市| 康平县| 塔河县| 化州市| 尖扎县| 军事| 华安县|