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

推荐订阅源

S
Securelist
有赞技术团队
有赞技术团队
WordPress大学
WordPress大学
V
V2EX
Google DeepMind News
Google DeepMind News
B
Blog RSS Feed
The Register - Security
The Register - Security
Recorded Future
Recorded Future
Y
Y Combinator Blog
小众软件
小众软件
Jina AI
Jina AI
V2EX - 技术
V2EX - 技术
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
宝玉的分享
宝玉的分享
The Hacker News
The Hacker News
C
Cybersecurity and Infrastructure Security Agency CISA
K
Kaspersky official blog
博客园 - 三生石上(FineUI控件)
T
Threatpost
博客园 - 聂微东
Scott Helme
Scott Helme
IT之家
IT之家
N
Netflix TechBlog - Medium
T
The Exploit Database - CXSecurity.com
S
Schneier on Security
MongoDB | Blog
MongoDB | Blog
T
Tor Project blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
A
About on SuperTechFans
酷 壳 – CoolShell
酷 壳 – CoolShell
C
CERT Recently Published Vulnerability Notes
P
Palo Alto Networks Blog
Spread Privacy
Spread Privacy
C
Check Point Blog
L
LINUX DO - 最新话题
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Last Week in AI
Last Week in AI
Attack and Defense Labs
Attack and Defense Labs
T
Tailwind CSS Blog
罗磊的独立博客
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Webroot Blog
Webroot Blog
Help Net Security
Help Net Security
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
爱范儿
爱范儿
PCI Perspectives
PCI Perspectives
Security Latest
Security Latest

博客园 - 飞得更高

MPI并行编程系列之五:图的单源最短路径算法 MPI并行编程系列之四:KMP算法及并行化 MPI并行编程系列三:并行正则采样排序PSRS MPI并行编程系列 MPI并行编程系列二:快速排序 MPI并行编程系列一:枚举排序 c#基础(一)之内存管理 用Windows Live Writer 首发Blog 一个被我长期忽略的一个问题:验证控件与Button的OnClientClick事件 远程数据自动导入的设计与实现 LINQ TO SQL 复杂查询之Queries with local collections are not supported linq下数据库接口的定义和实现(linq to SQL) sql 常用函数总结 面对恶意操作,勇敢说不------定制服务器端验证器 js浮点运算bug的解决办法 从页面的生命周期事件到页面基类(PageBase类)的编写 c# 委托实例 回车与服务器控件Button的Click事件 javascript:Web页面中的所有控件清空 - 飞得更高 - 博客园
验证控件失效,求助解决方案
飞得更高 · 2008-11-13 · via 博客园 - 飞得更高

     紧急事件:我的验证控件失效了,如下: 

Code

    点击Button会引发验证控件对TextBox的验证,当TextBox为空时,不能提交页面,没有任何的问题。但我做如下修改,将Button的Enable属性置为false,然后在触发某一事件后,Button的Enable属性为true,这时验证控件就会失去作用,代码如下:

Code

     这是为什么呢?我分析了这两种情况Button在客户对生成的代码:

     第一种情况:<input type="submit" name="Button1" value="Button" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;Button1&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="Button1" />
    第二种情况: <input type="submit" name="Button1" value="Button" id="Button1" disabled="disabled" />

    第二种情况真的没有生成验证代码,我发现只要在服务器端规定Button的Enable属性,验证控件就会失效,在客户端就规定就不会存在这个问题。

    能否解决这个问题,是验证控件一直起作用,望各位高手指导,我这里先谢谢了。