日期:2014-05-18  浏览次数:20418 次

ASP.NET AJAX的问题。验证控件不好用了
密码输入框不可为空,是用验证控件验证的,加上UpdatePanel后,如果输入框为空,不是验证控件显示,而是弹出一个对话框,一堆英文,如果把UpdatePanel去掉,验证控件就会正常提示密码不可为空,请教一下这是什么原因呢?应该怎样解决



------解决方案--------------------
楼主的验证控件在panel里面还是外面放着?
------解决方案--------------------
验证控件在AJAX的确出现很多不兼容的问题,记得这个MS已经给出了相关在AJAX下代替的用户控件,你去网上找找.
------解决方案--------------------
针对AJAX框架,微软重新出了一个验证控件。发邮件给我。我给你。20989740@qq.com
------解决方案--------------------
你看Asp.net 2.0 就知道,有一些控件是无法在UpdatePanel里正常工作的,具体的如下:
The following ASP.NET controls are not compatible with partial-page updates, and are therefore not supported inside an UpdatePanel control:
1.TreeView and Menu controls.
Web Parts controls. For more information, see ASP.NET Web Parts Pages.
2.FileUpload controls when they are used to upload files as part of an asynchronous postback. 
3.GridView and DetailsView controls when their EnableSortingAndPagingCallbacks property is set to true. The default is false.
4.Login, PasswordRecovery, ChangePassword, and CreateUserWizard controls whose contents have not been converted to editable templates.
5.The Substitution control.
6.Validation controls, which includes the BaseCompareValidator, BaseValidator, CompareValidator, CustomValidator, RangeValidator, RegularExpressionValidator, RequiredFieldValidator, and ValidationSummary control.

不清楚的你可以制出来.
------解决方案--------------------
微软官方下的asp.net 2.0 ajax document
-----------------------------------------
http://www.asp.net/ajax/downloads/
------解决方案--------------------

ASP.NET 2.0 下的验证码控件
icscs 著于2007-8-2 20:09:49
验证码是阻止恶意用户采用自动注册机/发帖机的一个好方法,也许你已经在Google,yahoo等大型网站上见到它的应用了。本文会给你一个这样的控件。