惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

云风的 BLOG
云风的 BLOG
P
Privacy International News Feed
Vercel News
Vercel News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
博客园 - 叶小钗
F
Fortinet All Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
L
LINUX DO - 最新话题
AWS News Blog
AWS News Blog
Engineering at Meta
Engineering at Meta
Attack and Defense Labs
Attack and Defense Labs
Recent Announcements
Recent Announcements
Recent Commits to openclaw:main
Recent Commits to openclaw:main
PCI Perspectives
PCI Perspectives
Cloudbric
Cloudbric
AI
AI
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
IT之家
IT之家
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
J
Java Code Geeks
M
MIT News - Artificial intelligence
Cisco Talos Blog
Cisco Talos Blog
V2EX - 技术
V2EX - 技术
Webroot Blog
Webroot Blog
Microsoft Security Blog
Microsoft Security Blog
Cyberwarzone
Cyberwarzone
博客园 - 聂微东
G
Google Developers Blog
W
WeLiveSecurity
罗磊的独立博客
P
Privacy & Cybersecurity Law Blog
阮一峰的网络日志
阮一峰的网络日志
A
About on SuperTechFans
WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
T
Tailwind CSS Blog
V
Visual Studio Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
S
Secure Thoughts
Apple Machine Learning Research
Apple Machine Learning Research
Hugging Face - Blog
Hugging Face - Blog
Google DeepMind News
Google DeepMind News
Google DeepMind News
Google DeepMind News
雷峰网
雷峰网
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
F
Full Disclosure
Blog — PlanetScale
Blog — PlanetScale
The Last Watchdog
The Last Watchdog
P
Proofpoint News Feed

博客园 - nect

【转】ie9 rc版软件兼容问题 [z]前端设计IE6/IE7/IE8/IE9/FF问题汇总:IE和FirFox兼容问题 - nect - 博客园 [z]ie和FF 在insertRow和insertCell的区别 [z]JS在IE和FF下attachEvent,addEventListener学习笔记 - nect - 博客园 WinForm使用webclient通过http的POST方式上传文件 转:另类解决:“ScriptManager”不是已知元素。原因可能是网站中存在编译错误。 - nect - 博客园 转:css妙用1-用图片替换文字 .net中的正则表达式(一)——转义字符 IP地址匹配算法 服务器控件的客户端验证脚本 从一个字符串中Remove另一个字符串 gridview 中模板列无法响应row_command事件 - nect - 博客园 在asp.net Atlas中调用 Web Service时无法找到自定义的Web Service对象的可能原因 【转】Prototype.js开发笔记//mark一下 在GridView中使用邮件链接 【转】ASP.net2。0中解决无法获取 GridView 隐藏列值问题 GridView 中格式化整理 [转]操纵自如--页面内的配合与通信 [导入]Java调用.net的WebService
使用Cascadingdropdown控件遇到的一个问题
nect · 2007-12-08 · via 博客园 - nect

昨天项目上需要是用Cascadingdropdown控件来实现3个dropdownlist的联动效果。本以为是个很容易的事情,结果却……
代码加上后,打开页面报15行有Sys.Debug……的错误,很奇怪。
开始以为自己的代码有问题,于是从网上考贝了一份代码过来,不过运行结果一样是Sys.debug错误。郁闷。
于是想到打开SampleWebSite站点看看是如何实现的,结果运行Samplewebsite站点的页面,同样也是报相同的错误。更郁闷了。
没办法,再打开在线的SampleWebSite站点看看,结果是正常的。我晕,我也没改动过AjaxControlToolkit的源代码呀:(

经过一番测时,发现当给第2、3个dropdownlist添加ParentControlID后,就会出现这个问题,不添加ParentControID属性,页面不报错,但是没有“联动”效果。

郁闷了一晚上,今天重新检查原因:其动脚本调试,发现报错代码是:

Sys.Debug.assert(this._parentElement != null, String.format(AjaxControlToolkit.Resources.CascadingDropDown_NoParentElement, this._parentControlID));

(应该是CascadingDropdownBehavior.js文件的110行)。
这句代码似乎是检测当前Dropdownlist的ParentControlID对应的Element是否存在【呵呵,没看全
代码,故且这么认为了,高手指点一下,以免其他小辈跟我一样误解:(】,既然这样的话,不如我去掉这个检查,看看是否可以。

于是在调试教本报错时,跳过110行的代码。虽然连续报了2次这个错误(因为我是3个dropdownlist的联动),不过居然页面效果却达到了:webservice调用成功,3个dropdownlist的内容获取正常,同时也有“联动”的效过。

后记:
1、最后我只能注释掉110行代码重新编译AjaxControToolkit.dll。
1、希望对AjaxControlToolkit比较感兴趣的前辈们在看到这个文章时能给予我一点帮助,虽然目前
可以使用,但是发布时加上的这句代码应改还是有道理的,而且我直接查看在线的SampleWebSit没有报错,“联动”效果也是有的。