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

推荐订阅源

H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
Check Point Blog
Hacker News: Ask HN
Hacker News: Ask HN
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
WordPress大学
WordPress大学
P
Proofpoint News Feed
V
Visual Studio Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
N
Netflix TechBlog - Medium
C
CXSECURITY Database RSS Feed - CXSecurity.com
博客园 - 聂微东
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
博客园 - 叶小钗
Cisco Talos Blog
Cisco Talos Blog
S
Schneier on Security
T
Threat Research - Cisco Blogs
腾讯CDC
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
The Hacker News
The Hacker News
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
GbyAI
GbyAI
N
News | PayPal Newsroom
L
LINUX DO - 最新话题
酷 壳 – CoolShell
酷 壳 – CoolShell
P
Palo Alto Networks Blog
T
Tenable Blog
S
Secure Thoughts
T
Threatpost
V2EX - 技术
V2EX - 技术
大猫的无限游戏
大猫的无限游戏
Martin Fowler
Martin Fowler
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Vercel News
Vercel News
罗磊的独立博客
P
Privacy & Cybersecurity Law Blog
Engineering at Meta
Engineering at Meta
小众软件
小众软件
Google DeepMind News
Google DeepMind News
N
News and Events Feed by Topic
Y
Y Combinator Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed
L
Lohrmann on Cybersecurity
P
Privacy International News Feed
H
Heimdal Security Blog
量子位
B
Blog

博客园 - 七思软件

基于.Net的架构设计之七 基于.Net架构设计之六 基于.Net的架构设计之五 基于.Net架构设计之四 基于.Net架构设计之三 基于.Net架构设计之二 基于.Net的架构设计之一 Microsoft.Visual.Studio.2005.Team.System 面象asp.net2.0的MasterControls控件 aspx页面中标题单点解决方案 求助,web应用程序中的进程线程控制 (The 'url' property had a malformed URL)求助 - 七思软件 Asp.net 2.0功能体验,总体设计思想 Asp.net 2.0功能体验,欢迎光临指导 C#中泛型求助 C#2.0中可空类型 迎接.Net2.0 我只是一只碌碌无为的工蚁 : ( 论Web控件开发 - 完美上传下载控件“新”(五)
Asp.net 2.0功能体验,细节之Web控件(一) 隐藏控件
七思软件 · 2005-12-03 · via 博客园 - 七思软件

此文是Asp.net 2.0功能体验,总体设计思想的后续文章

HiddenField现在终于作为System.Web.UI.WebControls命名控件下的一个正式控件提供。利用它及asp.net2.0中的新的数据绑定技术可以很容易实现无编码的数据更新。例如在示例网站中针对文章的编辑模板如下图所示:
其示例网址如下:
http://www.keyss.cn/admin/basismodule/article/article.aspx


从上图可以看出,我在FormView中放了三个hiddenfield之所以这样作,是不想在数据源控件在更新数据时再次读取该数据,而这三个field都不应提供给用户编辑所以此时是使用hiddenfield的最好时机。

但通过使用Reflector查看hiddenfield的源代码,发现它是从System.Web.UI.Control继承下来的并且不支持数据验证而他的客户端生成代码也是从input标记而来,按常理来讲很容易就可实现验证,当然在通常情况不可视的控件是不需要验证的,但在某些情况下验证还是有必要的,例如在上图中针对文章的内容的编辑我开发了一个大文本编辑控件,此控件在主页面中是没有可视的编辑界面的,而当单击图标按钮时显示一个html编辑器,当关闭并保存时,会把编辑的内容存回主页面的一个隐藏域中,而当保存记录时,我又希望能触发验证,为了解决此问题,我从新开发了一个新的hiddenfield控件,支持验证, 并从此控件重新继承了一个新的大文本编辑器控件来实现想要达到的功能。希望今后微软对些控件会作些调整吧。