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
>
查看全文
相关阅读:
在Visual Studio中怎样快速添加代码段
18个不常见的C#关键字,您使用过几个?
C# 非常好用的组元Tuple
C# List根据另一个List集合或数组排序
Expression 核心操作符、表达式、操作方法
如何避免频繁创建临时对象
C# 23种设计模式
C# 23种设计模式
Api Cloud官方日期类型转换
sql server 保留小数(续A)
原文地址:https://www.cnblogs.com/gwazy/p/1015080.html
最新文章
409. Longest Palindrome
389. Find the Difference
387. First Unique Character in a String
371. Sum of Two Integers
python实现根据目标字符串修改一下行
python机器学习一:KNN算法实现
367. Valid Perfect Square
350. Intersection of Two Arrays II
通过Linq查找重复数据
SpringCloud教程 | 第十二篇: 断路器监控(Hystrix Dashboard)
热门文章
SpringCloud教程 | 第十篇: 高可用的服务注册中心
SpringCloud教程 | 第九篇: 服务链路追踪(Spring Cloud Sleuth)
SpringCloud教程 | 第八篇: 消息总线(Spring Cloud Bus)
Spring cloud config 客户端连接RabbitMQ 报 socket closed
Intellij IDEA实现SpringBoot项目多端口启动的两种方法
windows10环境下的RabbitMQ安装步骤(图文)
SpringCloud教程 | 第七篇: 高可用的分布式配置中心(Spring Cloud Config)
SpringCloud教程 | 第六篇: 分布式配置中心(Spring Cloud Config)(Finchley版本)
SQL查询的IO信息中Worktable说明
如何将代码段添加到外侧代码里
Copyright © 2011-2022 走看看