当前位置: 移动技术网 > IT编程>开发语言>.net > Asp.net ajax实现任务提示页面的简单代码

Asp.net ajax实现任务提示页面的简单代码

2017年12月12日  | 移动技术网IT编程  | 我要评论

9c8968,竹山二手房,合肥雅信装饰公司

复制代码 代码如下:

<%@ page language="c#" %>
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en"
"http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<script runat="server">
    void waitfiveseconds(object o, eventargs e)
    {
        system.threading.thread.sleep(5000);
        label1.text = datetime.now.tolongtimestring( );
    }
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="head1" runat="server">
<title>asp.net ajax</title>
</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" text="do something" onclick="waitfiveseconds" /><br />
            <asp:label id="label1" runat="server" />
        </contenttemplate>
    </asp:updatepanel>
    <asp:updateprogress id="updateprogress1" runat="server" associatedupdatepanelid="updatepanel1">
        <progresstemplate>
        <div style="position: absolute; left: 200px; top: 150px; border: solid 1px black; padding:4px;">
            loading, please stand by ...
        </div>
        </progresstemplate>
    </asp:updateprogress>
</form>
</body>
</html>

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网