zoukankan
html css js c++ java
asp.net ajax 提交中,暂停提交
from msdn
protected
void
Button1_Click(
object
sender, EventArgs e)
{
System.Threading.Thread.Sleep(
3000
);
Label1.Text
=
System.DateTime.Now.ToString();
}
<%
@ Page Language
=
"
C#
"
AutoEventWireup
=
"
true
"
CodeBehind
=
"
WebForm1.aspx.cs
"
Inherits
=
"
WebApplication1.WebForm1
"
%>
<!
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
runat
="server"
>
<
title
>
Untitled Page
</
title
>
</
head
>
<
body
>
<
form
id
="form1"
runat
="server"
>
<
div
>
</
div
>
<
asp:ScriptManager
ID
="ScriptManager1"
runat
="server"
>
</
asp:ScriptManager
>
<
script
type
="text/javascript"
>
var
prm
=
Sys.WebForms.PageRequestManager.getInstance();
prm.add_initializeRequest(InitializeRequest);
function
InitializeRequest(sender, args)
{
if
(prm.get_isInAsyncPostBack())
{
args.set_cancel(
true
);
}
}
function
AbortPostBack()
{
if
(prm.get_isInAsyncPostBack())
{
prm.abortPostBack();
}
}
</
script
>
<
asp:UpdatePanel
ID
="UpdatePanel1"
runat
="server"
>
<
ContentTemplate
>
<
asp:Button
ID
="Button1"
runat
="server"
Text
="Button"
onclick
="Button1_Click"
/>
<
asp:Label
ID
="Label1"
runat
="server"
Text
="Label"
></
asp:Label
>
</
ContentTemplate
>
</
asp:UpdatePanel
>
<
asp:UpdateProgress
ID
="UpdateProgress1"
runat
="server"
>
<
ProgressTemplate
>
正在加载数据!
<
br
/>
<
input
type
="button"
value
="stop"
onclick
="AbortPostBack()"
/>
</
ProgressTemplate
>
</
asp:UpdateProgress
>
</
form
>
</
body
>
</
html
>
查看全文
相关阅读:
题解 【洛谷】AT654
题解【洛谷】CF134A
jquery中select的应用
Linq to xml 小例
mongodb 使用场景和不使用场景
一个面试题的解答-----从500(Id不连续)道试题库里随机抽取20道题!
数据采集
50款强力jquey,js 插件推荐
node.js 学习
wcf好文集合
原文地址:https://www.cnblogs.com/gwazy/p/1015080.html
最新文章
封装事件委托
devexpress 安装和破解
C# 调用C++ dll
一个UDP异步通信例子(转)
ASP.NET MVC4 学习参考
winform_TreeView失去焦点时选中节点仍然突显
byte[]转int,int转byte[]
C# 客户端调用web服务 wsdl转成dll调用
如何在VS2013创建WebService并在IIS中发布
关于串口接收数据不全的问题
热门文章
如何用C#导出Excel表格
emacs考场短配置
自闭版节奏大C
自闭枪战C++
跑酷天堂C++小黑框版
【长期维护】C++休闲(修仙)躲方块小游戏
【暂时停更】Gungame更新下载平台
自闭枪战V2.0(大改)
CPS Tester
千与千寻主题曲beep函数版
Copyright © 2011-2022 走看看