All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
分析一下网页子窗口和网页父窗口的交互_JavaScript技术_编程技术
C#动态生成树型结构的Web程序设计实例_.net资料_编程技术
20个实用PHP实例代码_[PHP教程]
用PHP5的DirectoryIterators递归扫描目录_[PHP教程]
asp.net带线的无限级下拉树列表_[Asp.Net教程]
PHP动态网站开发中常用的8个小技巧_php资料_编程技术
用php把现有动态新闻页面改成静态页的方案_php资料_编程技术
SQL,标量值函数的调用_mssql学习_编程技术
delphi坐标映射
LINQ可视化查询编辑器-,VLinq_[Asp.Net教程]
Reading number is top 10 pictures
9.3阅兵全景图7-指挥系统和后勤保障系统梯队
Sora aoi after swimming
The goddess of the single reason1
中国处女图鉴1
BingBingFan apple dew point photo gallery2
So beauty, will let you spray blood4
青春清纯美女大集合3
2013中国四川省高考作文
The money of more than 100 countries and regions5
The sixties of the last century, China is such a kill pig
Download software ranking
Call Of Duty5
Boxer vs Yellow3
Tram sex maniac 2 (H) rar bag15
jdk1.6 for windows
Tram sex maniac 2 (H) rar bag14
Unix video tutorial7
Boxer Classic video1
Sora aoi 120 minutes
Detective task-the top secret prostitution files
Love the forty days
归海一刀 published in(发表于) 2014/1/30 0:51:55 Edit(编辑)
Asp.net,Ajax,学习笔记2,UpdatePanel的使用(上)_[Asp.Net教程]

Asp.net,Ajax,学习笔记2,UpdatePanel的使用(上)_[Asp.Net教程]

Asp.net Ajax 学习笔记2 UpdatePanel的使用(上)_[Asp.Net教程]

这 一次课主要是讲UpdatePanel的使用


首先是它的基本属性


1、RenderMode:UpdatePanel的呈现模式,如果值是Block,那么它在客户端生成的是Div标签,如果值是Inline,那么它在客户端生成的是Span


2、UpdateMode属性和ChildrenAsTriggers属性:ChildrenAsTriggers默认为true。这两个属性其实是连起来使用的。假设有两个UPdatePanel,其中一个ChildrenAsTriggers为true,UpdateMode为Conditional时,这个UpdatePanel的更新会导致另外一个UpdatePanel的更新。如果ChildrenAsTriggers为false,UpdateMode为Conditional时,这个UpdatePanel的Content的内容不会更新,另一个UpdatePanel里的内容会更新。UpdateMode值为Always时,ChildrenAsTrigger不能为false,如果为true,它只更新自己内部的Content


3、Triggers标签用来指定哪个控件来触发UpdatePanel的更新 Triggers里面的标签AsyncPostBackTrigger用来指定这个UpdatePanel的更新时异步刷新


4、UpdatePanel有两个属性是互斥的。ChildrenAsTriggers和UpdateMode。UpdateMode是用来指定在UpdatePanel里面的提交控件是否总是用来触发刷新的,有两个值,一个是Always表明总是触发刷新、一个是Conditional,表明是有条件的。ChildrenAsTriggers用来表明UpdatePanel里面的提交控件是否用来刷新


ChildrenAsTriggers="false" UpdateMode="always"
这样的的属性值指定会产生错误





<%= DateTime.Now %>







这样的指定Triggers的指定才是有效的,如果ChildrenAsTriggers为True,UpdateMode为Always那么,Triggers的指定是完全无效的


5、Triggers标签可以指定不在UpdatePanel里面的回发控件和在另一个UpdatePanel的回发控件来触发回发




<%= DateTime.Now %>









<%= DateTime.Now %>



上面这段代码中,UpdatePanel1中的Button1会触发UpdatePanel2中的时间,因为没有指定UpdatePanel的UpdateMode为Conditional并且ChildrenAsTriggers为False


6、UpdatePanel是允许嵌套的,控制嵌套UpdatePanel内部控件的更新,由上面描述的几个标签和属性控制


总结:上面所描述的几种标签和属性可以自由的结合查看其效果







添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.