zoukankan
html css js c++ java
ajax的loading显示在gridview的位置
<
body
>
<
form id
=
"
form1
"
runat
=
"
server
"
>
<
asp:ScriptManager ID
=
"
ScriptManager1
"
runat
=
"
server
"
>
</
asp:ScriptManager
>
<
asp:UpdatePanel ID
=
"
UpdatePanel1
"
runat
=
"
server
"
>
<
ContentTemplate
>
<
div style
=
"
background-color:Beige;
"
>
<
asp:GridView ID
=
"
GridView1
"
runat
=
"
server
"
AutoGenerateColumns
=
"
False
"
DataSourceID
=
"
AccessDataSource1
"
>
<
Columns
>
<
asp:BoundField DataField
=
"
图书简介
"
HeaderText
=
"
图书简介
"
SortExpression
=
"
图书简介
"
/>
<
asp:BoundField DataField
=
"
图书名称
"
HeaderText
=
"
图书名称
"
SortExpression
=
"
图书名称
"
/>
<
asp:BoundField DataField
=
"
作者
"
HeaderText
=
"
作者
"
SortExpression
=
"
作者
"
/>
</
Columns
>
</
asp:GridView
>
<
div style
=
"
position:absolute; top:100px; left:300px; font-size:40px; color:Red;
"
>
<
asp:UpdateProgress ID
=
"
UpdateProgress1
"
runat
=
"
server
"
>
<
ProgressTemplate
>
<
div
>
更新数据,请稍候……
</
div
>
</
ProgressTemplate
>
</
asp:UpdateProgress
>
</
div
>
</
div
>
<
asp:Button ID
=
"
Button1
"
runat
=
"
server
"
Text
=
"
Button
"
onclick
=
"
Button1_Click
"
/>
</
ContentTemplate
>
</
asp:UpdatePanel
>
<
asp:AccessDataSource ID
=
"
AccessDataSource1
"
runat
=
"
server
"
DataFile
=
"
~/App_Data/电子交易.mdb
"
SelectCommand
=
"
SELECT [图书简介], [图书名称], [作者] FROM [书籍信息]
"
>
</
asp:AccessDataSource
>
</
form
>
</
body
>
页面上用到了
UpdateProgress,以便在进行各种操作时显示一个等待图标,给用户解解闷,好让他们在漫长的等待结果的岁月中不那么烦躁,知道系统正在忙。
形如:
<
asp:UpdateProgress ID
=
"
UpdateProgress1
"
runat
=
"
server
"
>
<
ProgressTemplate
>
<
img src
=
"
../images/loading.gif
"
alt
=
"
请稍候
"
/>
</
ProgressTemplate
>
</
asp:UpdateProgress
>
可是这样写的话图标就歪在一边,不显眼。如果写上个绝对定位,比如
style
=
"
position:absolute;left:400px;top:300px;
"
,可这仅仅适合800
*
600的屏幕,而用户的屏幕分辨率千差万别。
最后发觉可以用百分比,这样写:
<
asp:UpdateProgress ID
=
"
UpdateProgress1
"
runat
=
"
server
"
>
<
ProgressTemplate
>
<
img src
=
"
../images/loading.gif
"
alt
=
"
请稍候
"
style
=
"
position:absolute;left:50%;top:50%;
"
/>
</
ProgressTemplate
>
</
asp:UpdateProgress
>
查看全文
相关阅读:
(转)使用 PyInstaller 把python程序 .py转为 .exe 可执行程序
(转)使用 python Matplotlib 库绘图
使用Matplotlib画图系列(一)
Numpy常用金融计算(一)
Windows中安装Linux子系统的详细步骤
Centos7+Postfix+Dovecot实现内网邮件收发 风行天下
centos7系统防火墙端口转发 风行天下
Centos7+Postfix+Dovecot实现内网邮件收发
centos7的路径含有空格Linux命令使用时路径存在空格、特殊符号(如、@等等) 风行天下
zabbix无法使用Detect operating system [zabbix] 风行天下
原文地址:https://www.cnblogs.com/barney/p/1206508.html
最新文章
zt:泛型反射和普通反射的区别
调用存储过程返回复杂类型
zt:使用复杂类型创建和执行对象查询
zt:WPF和Silverlight集合类型接口汇总
Farm Tour(费用流模板题)
Codeforces 833A The Meaningless Game
bzoj 1008 [HNOI2008]越狱
过河(NOIP2005 T2)
学习错误总结
NOIP2011题解
热门文章
bzoj 1012 [JSOI2008]最大数maxnumber
bzoj1001 [BeiJing2006]狼抓兔子
bzoj 1015 [JSOI2008]星球大战starwar
Python ifelse 的多种简洁写法
通过 lsyncd + rsync 同步文件
Python MySQL数据库操作
Python 文件读写
1. Docker基础命令
进程间通信: 管道
(转)QT中QWidget、QDialog及QMainWindow的区别
Copyright © 2011-2022 走看看