ajaxToolkit:ValidatorCalloutExtender 使用问题

Sys.ArgumentUndefinedException:Value cannot be undefined. Parameter name:id
使用ajaxToolkit:ValidatorCalloutExtender控件,用了updataPanel时,页面不postBack时,ValidatorCalloutExtender控件可以正常工作,页面不提示错误,一旦页面postBack后,ValidatorCalloutExtender就不工作了,页面提示错误,错误描述就是上面那个。

解决方案,下载 Validators.zip

     解压后将生成的Validators.dll文件拷贝到自己的工程的bin文件夹下,然后在你的工程下的web.config文件中         configuration/system.web/pages下加入如下语句:

< tagMapping >    
         
< add tagType = " System.Web.UI.WebControls.CompareValidator "             mappedTagType = " Sample.Web.UI.Compatibility.CompareValidator, Validators, Version=1.0.0.0 " />  
         
< add tagType = " System.Web.UI.WebControls.CustomValidator "              mappedTagType = " Sample.Web.UI.Compatibility.CustomValidator, Validators, Version=1.0.0.0 " />  
         
< add tagType = " System.Web.UI.WebControls.RangeValidator "               mappedTagType = " Sample.Web.UI.Compatibility.RangeValidator, Validators, Version=1.0.0.0 " />  
         
< add tagType = " System.Web.UI.WebControls.RegularExpressionValidator "  mappedTagType = " Sample.Web.UI.Compatibility.RegularExpressionValidator, Validators, Version=1.0.0.0 " />  
         
< add tagType = " System.Web.UI.WebControls.RequiredFieldValidator "       mappedTagType = " Sample.Web.UI.Compatibility.RequiredFieldValidator, Validators, Version=1.0.0.0 " />  
         
< add tagType = " System.Web.UI.WebControls.ValidationSummary "            mappedTagType = " Sample.Web.UI.Compatibility.ValidationSummary, Validators, Version=1.0.0.0 " />  
       
</ tagMapping >  

你可能感兴趣的:(Validator)