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

推荐订阅源

云风的 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

博客园 - 拼命郎

Gated Check-in function in TeamBuild 2010 急死我了!!!vs 2005 单元测试 总是报错 读书笔记- programing .net components(o'Reilly) 由一个关于数据库操作类的写法而想到的。。。。 在sqlserver建表时尽量不要用特殊的字符,如[、]、回车等 关于嵌套事务的一种处理方法 关于.net 控件的html 属性的几点技巧 一个关于内容换行的问题 jbuilder 中不能调试的一种情况 几点关于java的代码常用规范 最近项目中一些关于代码编写管理的一些思考 几点asp.net的小收获 IsDbNull 方法的用法 两个概念:结构化和层次化的含义 一个char类型的字符赋给一个string对象时不会发生装箱操作 浅析.Net下的AppDomain编程 (转载) 属性(Attributs)笔记 用事件和代理实现的一个闹钟实例 操作符重载笔记
关于asp.net2.0里的Multiview和View控件的显示与隐藏实现的问题
拼命郎 · 2008-07-22 · via 博客园 - 拼命郎

     在用view控件实现一系列业务操作的分步操作时发现了一个问题,在某个View中实现了如下功能:

     A控件放在其中一个View中,用控制A控件的显示和隐藏(Visible)的方法表示业务中存在A和不存在A的情况,并用来作为一个属性的字段。

     切换View前读取此属性无任何问题,可当切换View后读取此属性一直为不存在,也就是A控件的Visible属性一直为False。跟踪代码也确实如此。

     不知道这种情况是否.net的一个bug,可能跟asp.net的View与MultiView的实现方式有关吧,本人正在查找资料,但网上讲应用的多原理的少,无奈正准备去慢慢看View的源代码。

     希望有兴趣的xdjm共同探讨。

     下面我先抛砖引玉,说一下我的理解。

     首先从Visible这个属性说起,我发现官方提供的web控件都继承自System.Web.UI.Control这个类,同时,Control 类的Visible这个属性是个virtual属性的方法。本人猜测当隐藏和现实一个View容器,可能通过的是改变其内所有控件Visible属性来实现的,毕竟这样对于多个同根的派生类来说实现起来很简单。