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

Reading number is top 10 articles
基础知识:PHP连接mysql测试和配置_php资料_编程技术
PHP编程技巧:看实例学正则表达式_php资料_编程技术
XML入门教程:掌握学习 XML 语法规则_[XML教程]
SQLServer2005中的XML选项详解(2)_[SQL Server教程]
ASP.NET服务器控件编程之卷首语_[Asp.Net教程]
.Net,2.0,原汁原味读取注册表_[Asp.Net教程]
asp.net2.0对Repeater数据控件进行绑定
资深网管教你一步步安装MYSQL数据库_[PHP教程]
关于discuz论坛附件不能上传解决办法_php资料_编程技术
数据回发时,维护ASP.NET,Tree控件位置_.net资料_编程技术
Reading number is top 10 pictures
Kim jong il's mistress, national beauty JinYuJi actor1
Exquisite decoration is not paying too much1
Azusa Yamamoto2
Players in the eyes of a perfect love2
Take you to walk into the most true north Korea rural3
毕姥爷事件,告诉你6条真理
移民小国也实惠1
中国的阶级现状
The real super beauty2
湖南中医院的养生八图
Download software ranking
The Bermuda triangle3
Unix video tutorial4
艳兽都市
Sora aoi, the nurse, uniform ,nursing assistant
jdk1.5
Boxer's Top ten classic battle1
网络管理员第三版
Boxer vs Yellow3
致我们终将逝去的青春
Boxer's Top ten classic battle5
aaa published in(发表于) 2013/12/11 8:30:18 Edit(编辑)
关天asp.net,ajax,beta中在updatepnael中注册脚本的解决方案_.net资料_编程技术

关天asp.net,ajax,beta中在updatepnael中注册脚本的解决方案_.net资料_编程技术

关天asp.net ajax beta中在updatepnael中注册脚本的解决方案_.net资料_编程技术-你的首页-uuhomepage.com







最近也在看一些asp.net ajax 的资料,在网上看到很多人都在问如何在updatepanel中注册脚本,我也试了一下,不过总是不行,就看了好多资料,最后才知道自己没有完全理解 ScriptManager.RegisterClientScriptBlock(Control control,Type type,string key, string script,bool addScriptTags),其中的各个参数。(注:RegisterClientScriptBlock是 ScriptManager的一个静态方法)
参数详解:
control (Control) :这个参数是注册脚本块的控件.如果你是在updatepanel中注册时,即updatepanel (应该写updatepanel的ID).
type (Type) :这个参数是注册脚本块控件的类型,即updatepanel的类型。
key (String) :这个参数是脚本酷块的惟一标识(关键字)
script (String) :这个参数是要注册的脚本字符串.
addScriptTags (Boolean) :这个参数表示是否要在您的字符串两边使用“”包围起来.




然后这是我写的一个简单的例子:

Html代码:
http://www.w3.org/1999/xhtml">

Untitled Page
rel="stylesheet" type="text/css" />














CS代码:
protected void Button1_Click(object sender, EventArgs e)
{
ScriptManager.RegisterClientScriptBlock(UpdatePanel1, typeof(UpdatePanel), "test", "alert('test');", true);




}




以上是我的理解,如果有不正确的地方,请大家纠正,我先放到首页,其实没有什么技术含量,主要是用来让那些还不知道如何注册的朋友看到.过后dohu可以删了。



























添加到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.